[Wine-patches] [1/6] [eter-2.0.0] ntoskrnl.exe: Avoid crashing when passed NULL object pointer. (eterbug #8744)

Dmitry Timoshkov dtimoshkov на etersoft.ru
Пн Окт 15 06:56:26 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 52f725e..9b04a32 100644
--- a/dlls/ntoskrnl.exe/ntoskrnl.c
+++ b/dlls/ntoskrnl.exe/ntoskrnl.c
@@ -2760,6 +2760,8 @@ NTSTATUS WINAPI KeWaitForSingleObject( PVOID Object, KWAIT_REASON WaitReason,
 
     TRACE("%p %u %d %d %p\n", Object, WaitReason, WaitMode, Alertable, Timeout);
 
+    if (!Object) return STATUS_INVALID_PARAMETER;
+
     switch (header->Type)
     {
     case NotificationEvent:
-- 
1.7.12.3



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