Procházet zdrojové kódy

WaitSynchronizationN: Handle case where handles=nullptr.

bunnei před 11 roky
rodič
revize
627e96fc15
1 změnil soubory, kde provedl 4 přidání a 0 odebrání
  1. 4 0
      src/core/hle/svc.cpp

+ 4 - 0
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;