diff options
author | Alan Modra <amodra@gmail.com> | 2019-12-11 08:57:45 +1030 |
---|---|---|
committer | Alan Modra <amodra@gmail.com> | 2019-12-11 11:42:09 +1030 |
commit | 5c05618a0a1f94565001a19da28595ce1dc537f8 (patch) | |
tree | 7621eeff0955bb221e096e9561f4c1239de416bb /opcodes/vax-dis.c | |
parent | 2a81ccbbbf81ab9c66ba366a0c1da7abb6460423 (diff) | |
download | gdb-5c05618a0a1f94565001a19da28595ce1dc537f8.zip gdb-5c05618a0a1f94565001a19da28595ce1dc537f8.tar.gz gdb-5c05618a0a1f94565001a19da28595ce1dc537f8.tar.bz2 |
ubsan: vax: left shift cannot be represented in type 'int'
* vax-dis.c (NEXTLONG): Avoid signed overflow.
Diffstat (limited to 'opcodes/vax-dis.c')
-rw-r--r-- | opcodes/vax-dis.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/opcodes/vax-dis.c b/opcodes/vax-dis.c index 2c02c29..3bdfa15 100644 --- a/opcodes/vax-dis.c +++ b/opcodes/vax-dis.c @@ -64,7 +64,7 @@ static char *entry_mask_bit[] = #define COERCE32(x) ((int) (((x) ^ 0x80000000) - 0x80000000)) #define NEXTLONG(p) \ (p += 4, FETCH_DATA (info, p), \ - (COERCE32 ((((((p[-1] << 8) + p[-2]) << 8) + p[-3]) << 8) + p[-4]))) + (COERCE32 (((((((unsigned) p[-1] << 8) + p[-2]) << 8) + p[-3]) << 8) + p[-4]))) /* Maximum length of an instruction. */ #define MAXLEN 25 |