reactos/ntoskrnl/ke
diff -u -r1.57 -r1.58
--- wait.c 15 Aug 2004 16:39:05 -0000 1.57
+++ wait.c 24 Sep 2004 20:26:43 -0000 1.58
@@ -495,6 +495,8 @@
DPRINT("Entering KeWaitForMultipleObjects(Count %lu Object[] %p) "
"PsGetCurrentThread() %x\n", Count, Object, PsGetCurrentThread());
+ assert(0 < Count && Count <= EX_MAXIMUM_WAIT_OBJECTS);
+
CurrentThread = KeGetCurrentThread();
WaitIrql = KeGetCurrentIrql();
@@ -745,6 +747,8 @@
if (Count > EX_MAXIMUM_WAIT_OBJECTS)
return STATUS_UNSUCCESSFUL;
+ if (0 == Count)
+ return STATUS_INVALID_PARAMETER;
if (UnsafeTime)
{