advapi32: Fix comparisons of unsigned expressions with zero

Andrew Talbot Andrew.Talbot at talbotville.com
Thu Dec 7 16:56:23 CST 2006


Changelog:
    advapi32: Fix comparisons of unsigned expressions with zero.

diff -urN a/dlls/advapi32/service.c b/dlls/advapi32/service.c
--- a/dlls/advapi32/service.c	2006-10-12 21:30:35.000000000 +0100
+++ b/dlls/advapi32/service.c	2006-12-07 18:37:29.000000000 +0000
@@ -1777,7 +1777,7 @@
         n -= sz;
     }
 
-    if( n < 0 )
+    if( (LONG)n < 0 )
         ERR("Buffer overflow!\n");
 
     TRACE("Image path = %s\n", lpServiceConfig->lpBinaryPathName );
@@ -1924,7 +1924,7 @@
 	n -= sizeof(WCHAR);
     }
 
-    if( n < 0 )
+    if( (LONG)n < 0 )
         ERR("Buffer overflow!\n");
 
     TRACE("Image path = %s\n", debugstr_w(lpServiceConfig->lpBinaryPathName) );



More information about the wine-patches mailing list