From: Alan Modra Date: Mon, 20 Jan 2020 02:01:58 +0000 (+1030) Subject: ubsan: arm: out of bounds array access X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=2bddb71a7421213dd9d8b8f2db133b43f5e1357e;p=binutils-gdb.git ubsan: arm: out of bounds array access .inst 0x81bdfe9f disassembles as 0: 81bdfe9f ldaexdhi pc, reg-names-std, [sp] I'm quite sure "reg-names-std" isn't an ARM register. * arm-dis.c (print_insn_arm): Wrap 'T' value. --- diff --git a/opcodes/ChangeLog b/opcodes/ChangeLog index 1f717519270..04eaa863e7c 100644 --- a/opcodes/ChangeLog +++ b/opcodes/ChangeLog @@ -1,3 +1,7 @@ +2020-01-20 Alan Modra + + * arm-dis.c (print_insn_arm): Wrap 'T' value. + 2020-01-18 Nick Clifton * configure: Regenerate. diff --git a/opcodes/arm-dis.c b/opcodes/arm-dis.c index c986b5897ed..be2a93253bb 100644 --- a/opcodes/arm-dis.c +++ b/opcodes/arm-dis.c @@ -10106,7 +10106,7 @@ print_insn_arm (bfd_vma pc, struct disassemble_info *info, long given) case 'T': /* We want register + 1 when decoding T. */ if (*c == 'T') - ++value; + value = (value + 1) & 0xf; if (c[1] == 'u') {