[Wine-patches] [eterhack] ntoskrnl.exe: Avoid crashing when passed NULL object pointer. (eterbug #4884)

Dmitry Timoshkov dtimoshkov на etersoft.ru
Вт Окт 2 10:00:17 MSK 2012


---
 dlls/ntoskrnl.exe/ntoskrnl.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/dlls/ntoskrnl.exe/ntoskrnl.c b/dlls/ntoskrnl.exe/ntoskrnl.c
index 1350c54..9b23362 100644
--- a/dlls/ntoskrnl.exe/ntoskrnl.c
+++ b/dlls/ntoskrnl.exe/ntoskrnl.c
@@ -2785,6 +2785,8 @@ NTSTATUS WINAPI KeWaitForSingleObject(PVOID Object,
 
     TRACE( "%p, %d, %d, %d, %p\n", Object, WaitReason, WaitMode, Alertable, Timeout );
 
+    if (!Object) return STATUS_INVALID_PARAMETER;
+
     switch (header->Type)
     {
     case NotificationEvent:
-- 
1.7.12.1



Подробная информация о списке рассылки Wine-patches