From 627e96fc15f99eea0f1c5ccdb46d85cadb3efd69 Mon Sep 17 00:00:00 2001 From: bunnei Date: Sat, 17 Jan 2015 14:04:54 -0500 Subject: WaitSynchronizationN: Handle case where handles=nullptr. --- src/core/hle/svc.cpp | 4 ++++ 1 file changed, 4 insertions(+) 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; -- cgit v1.2.3