diff options
| author | 2015-01-17 14:04:54 -0500 | |
|---|---|---|
| committer | 2015-01-21 19:09:10 -0500 | |
| commit | 627e96fc15f99eea0f1c5ccdb46d85cadb3efd69 (patch) | |
| tree | 0a9b9be2d0d1d4fe410a4f28a3caafa0676e4a1f /src/core/hle/svc.cpp | |
| parent | WaitSynchronizationN: Handle case where handle_count is invalid. (diff) | |
| download | yuzu-627e96fc15f99eea0f1c5ccdb46d85cadb3efd69.tar.gz yuzu-627e96fc15f99eea0f1c5ccdb46d85cadb3efd69.tar.xz yuzu-627e96fc15f99eea0f1c5ccdb46d85cadb3efd69.zip | |
WaitSynchronizationN: Handle case where handles=nullptr.
Diffstat (limited to 'src/core/hle/svc.cpp')
| -rw-r--r-- | src/core/hle/svc.cpp | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/src/core/hle/svc.cpp b/src/core/hle/svc.cpp index 637c63b91..23885f129 100644 --- a/src/core/hle/svc.cpp +++ b/src/core/hle/svc.cpp | |||
| @@ -148,6 +148,10 @@ static Result WaitSynchronizationN(s32* out, Handle* handles, s32 handle_count, | |||
| 148 | bool wait_all_succeeded = false; | 148 | bool wait_all_succeeded = false; |
| 149 | int handle_index = 0; | 149 | int handle_index = 0; |
| 150 | 150 | ||
| 151 | // Handles pointer is invalid | ||
| 152 | if (handles == nullptr) | ||
| 153 | return ResultCode(ErrorDescription::InvalidPointer, ErrorModule::Kernel, ErrorSummary::InvalidArgument, ErrorLevel::Permanent).raw; | ||
| 154 | |||
| 151 | // Negative handle_count is invalid | 155 | // Negative handle_count is invalid |
| 152 | if (handle_count < 0) | 156 | if (handle_count < 0) |
| 153 | return ResultCode(ErrorDescription::OutOfRange, ErrorModule::OS, ErrorSummary::InvalidArgument, ErrorLevel::Usage).raw; | 157 | return ResultCode(ErrorDescription::OutOfRange, ErrorModule::OS, ErrorSummary::InvalidArgument, ErrorLevel::Usage).raw; |