WaitForMultipleObjects loops forever if passed an array of size zero

Troy Rollo wine at troy.rollo.name
Tue Jun 24 20:34:54 CDT 2003


Index: dlls/ntdll/sync.c
===================================================================
RCS file: /home/wine/wine/dlls/ntdll/sync.c,v
retrieving revision 1.27
diff -u -r1.27 sync.c
--- dlls/ntdll/sync.c	4 Apr 2003 22:26:34 -0000	1.27
+++ dlls/ntdll/sync.c	25 Jun 2003 01:18:33 -0000
@@ -412,7 +412,7 @@
 {
     int ret, cookie;
 
-    if (count > MAXIMUM_WAIT_OBJECTS) return STATUS_INVALID_PARAMETER_1;
+    if (count > MAXIMUM_WAIT_OBJECTS || count <= 0) return 
STATUS_INVALID_PARAMETER_1;
 
     for (;;)
     {
I




More information about the wine-patches mailing list