Commit in reactos/ntoskrnl/ke on MAIN
wait.c+41.57 -> 1.58
You can't wait for 0 objects

reactos/ntoskrnl/ke
wait.c 1.57 -> 1.58
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)
      {
CVSspam 0.2.8