From: Marcus Meissner Subject: [PATCH] winedbg: handle length >= 32bit (Coverity) Message-Id: <1430987361-8188-1-git-send-email-marcus@jet.franken.de> Date: Thu, 7 May 2015 10:29:21 +0200 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