summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorbunnei <bunneidev@gmail.com>2015-01-17 20:04:54 +0100
committerbunnei <bunneidev@gmail.com>2015-01-22 01:09:10 +0100
commit627e96fc15f99eea0f1c5ccdb46d85cadb3efd69 (patch)
tree0a9b9be2d0d1d4fe410a4f28a3caafa0676e4a1f
parentWaitSynchronizationN: Handle case where handle_count is invalid. (diff)
downloadyuzu-627e96fc15f99eea0f1c5ccdb46d85cadb3efd69.tar
yuzu-627e96fc15f99eea0f1c5ccdb46d85cadb3efd69.tar.gz
yuzu-627e96fc15f99eea0f1c5ccdb46d85cadb3efd69.tar.bz2
yuzu-627e96fc15f99eea0f1c5ccdb46d85cadb3efd69.tar.lz
yuzu-627e96fc15f99eea0f1c5ccdb46d85cadb3efd69.tar.xz
yuzu-627e96fc15f99eea0f1c5ccdb46d85cadb3efd69.tar.zst
yuzu-627e96fc15f99eea0f1c5ccdb46d85cadb3efd69.zip
-rw-r--r--src/core/hle/svc.cpp4
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,
bool wait_all_succeeded = false;
int handle_index = 0;
+ // Handles pointer is invalid
+ if (handles == nullptr)
+ return ResultCode(ErrorDescription::InvalidPointer, ErrorModule::Kernel, ErrorSummary::InvalidArgument, ErrorLevel::Permanent).raw;
+
// Negative handle_count is invalid
if (handle_count < 0)
return ResultCode(ErrorDescription::OutOfRange, ErrorModule::OS, ErrorSummary::InvalidArgument, ErrorLevel::Usage).raw;