Alexandre Julliard : netapi32: Fix wrap-around bug in tick count comparison .

Alexandre Julliard julliard at winehq.org
Thu Jan 24 12:59:49 CST 2013


Module: wine
Branch: master
Commit: 2c70e08cf8d920bfcf5427ba1ee468f4fa5a8f14
URL:    http://source.winehq.org/git/wine.git/?a=commit;h=2c70e08cf8d920bfcf5427ba1ee468f4fa5a8f14

Author: Alexandre Julliard <julliard at winehq.org>
Date:   Thu Jan 24 15:15:35 2013 +0100

netapi32: Fix wrap-around bug in tick count comparison.

---

 dlls/netapi32/nbt.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/dlls/netapi32/nbt.c b/dlls/netapi32/nbt.c
index 1bbcaf0..2a871de 100644
--- a/dlls/netapi32/nbt.c
+++ b/dlls/netapi32/nbt.c
@@ -297,7 +297,7 @@ static UCHAR NetBTWaitForNameResponse(const NetBTAdapter *adapter, SOCKET fd,
     if (fd == INVALID_SOCKET) return NRC_BADDR;
     if (!answerCallback) return NRC_BADDR;
 
-    while (!found && ret == NRC_GOODRET && (now = GetTickCount()) < waitUntil)
+    while (!found && ret == NRC_GOODRET && (int)((now = GetTickCount()) - waitUntil) < 0)
     {
         DWORD msToWait = waitUntil - now;
         struct fd_set fds;




More information about the wine-cvs mailing list