From: Michael Gilbert Date: Tue, 13 Sep 2022 00:46:21 +0000 (+0100) Subject: avoid shifting into the signed bit of integers X-Git-Tag: archive/raspbian/7.0_repack-10+rpi1~2^2^2^2~17 X-Git-Url: https://dgit.raspbian.org/?a=commitdiff_plain;h=1a76a1fd3fd6d85b9d1943aae550832bcd01aa93;p=wine.git avoid shifting into the signed bit of integers Gbp-Pq: Topic armhf Gbp-Pq: Name shift-overflow.patch --- diff --git a/programs/winedbg/be_arm.c b/programs/winedbg/be_arm.c index a9551a4..c6312e7 100644 --- a/programs/winedbg/be_arm.c +++ b/programs/winedbg/be_arm.c @@ -706,12 +706,12 @@ static UINT thumb2_disasm_branch(UINT inst, ADDRESS64 *addr) if (C) { offset |= I1 << 19 | I2 << 18 | (inst & 0x003f0000) >> 4; - if (S) offset |= 0x0fff << 20; + if (S) offset |= 0xfff00000; } else { offset |= I1 << 23 | I2 << 22 | (inst & 0x03ff0000) >> 4; - if (S) offset |= 0xff << 24; + if (S) offset |= 0xff000000; } dbg_printf("\n\tb%s%s\t", L ? "l" : "", C ? tbl_cond[(inst >> 22) & 0x0f] : "");