[PATCH] winedbg: handle length >= 32bit (Coverity)

Marcus Meissner marcus at jet.franken.de
Thu May 7 03:29:21 CDT 2015


1195685 Bad bit shift operation
---
 programs/winedbg/types.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/programs/winedbg/types.c b/programs/winedbg/types.c
index de790c7..6135341 100644
--- a/programs/winedbg/types.c
+++ b/programs/winedbg/types.c
@@ -200,7 +200,7 @@ static BOOL types_get_udt_element_lvalue(struct dbg_lvalue* lvalue,
         /* FIXME: this test isn't sufficient, depending on start of bitfield
          * (ie a 32 bit field can spread across 5 bytes)
          */
-        if (length > 8 * sizeof(*tmpbuf)) return FALSE;
+        if (length >= 8 * sizeof(*tmpbuf)) return FALSE;
         lvalue->addr.Offset += bitoffset >> 3;
         /*
          * Bitfield operation.  We have to extract the field and store
-- 
1.8.4.5




More information about the wine-patches mailing list