[PATCH] usp10: fixed border condition in shifts (Coverity)

Marcus Meissner marcus at jet.franken.de
Sun Apr 6 13:27:33 CDT 2014


1195670 Bad bit shift operation

i could have been between 1 and 32 due to the >8*4
---
 dlls/usp10/tests/usp10.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/dlls/usp10/tests/usp10.c b/dlls/usp10/tests/usp10.c
index 22a4ab2..a7fbc73 100644
--- a/dlls/usp10/tests/usp10.c
+++ b/dlls/usp10/tests/usp10.c
@@ -837,7 +837,7 @@ static int CALLBACK enumFontProc( const LOGFONTA *lpelfe, const TEXTMETRICA *lpn
         return 1;
 
     i = rp->range;
-    while (i > sizeof(DWORD)*8)
+    while (i >= sizeof(DWORD)*8)
     {
         idx++;
         i -= (sizeof(DWORD)*8);
-- 
1.8.4.5




More information about the wine-patches mailing list