Skip to content

Commit

Permalink
Merge pull request #13 from talsaiag/kernel32_fix
Browse files Browse the repository at this point in the history
missing nCount parameter
  • Loading branch information
MarioVilas committed Sep 23, 2016
2 parents 6704b33 + dd8d97b commit e36dc9c
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions winappdbg/win32/kernel32.py
Original file line number Diff line number Diff line change
Expand Up @@ -3379,12 +3379,12 @@ def WaitForMultipleObjects(handles, bWaitAll = False, dwMilliseconds = INFINITE)
lpHandlesType = HANDLE * nCount
lpHandles = lpHandlesType(*handles)
if dwMilliseconds != INFINITE:
r = _WaitForMultipleObjects(byref(lpHandles), bool(bWaitAll), dwMilliseconds)
r = _WaitForMultipleObjects(nCount, byref(lpHandles), bool(bWaitAll), dwMilliseconds)
if r == WAIT_FAILED:
raise ctypes.WinError()
else:
while 1:
r = _WaitForMultipleObjects(byref(lpHandles), bool(bWaitAll), 100)
r = _WaitForMultipleObjects(nCount, byref(lpHandles), bool(bWaitAll), 100)
if r == WAIT_FAILED:
raise ctypes.WinError()
if r != WAIT_TIMEOUT:
Expand All @@ -3409,12 +3409,12 @@ def WaitForMultipleObjectsEx(handles, bWaitAll = False, dwMilliseconds = INFINIT
lpHandlesType = HANDLE * nCount
lpHandles = lpHandlesType(*handles)
if dwMilliseconds != INFINITE:
r = _WaitForMultipleObjectsEx(byref(lpHandles), bool(bWaitAll), dwMilliseconds, bool(bAlertable))
r = _WaitForMultipleObjectsEx(nCount, byref(lpHandles), bool(bWaitAll), dwMilliseconds, bool(bAlertable))
if r == WAIT_FAILED:
raise ctypes.WinError()
else:
while 1:
r = _WaitForMultipleObjectsEx(byref(lpHandles), bool(bWaitAll), 100, bool(bAlertable))
r = _WaitForMultipleObjectsEx(nCount, byref(lpHandles), bool(bWaitAll), 100, bool(bAlertable))
if r == WAIT_FAILED:
raise ctypes.WinError()
if r != WAIT_TIMEOUT:
Expand Down

0 comments on commit e36dc9c

Please sign in to comment.