ubsan: arm: out of bounds array access
authorAlan Modra <amodra@gmail.com>
Mon, 20 Jan 2020 02:01:58 +0000 (12:31 +1030)
committerAlan Modra <amodra@gmail.com>
Mon, 20 Jan 2020 05:15:50 +0000 (15:45 +1030)
 .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.

opcodes/ChangeLog
opcodes/arm-dis.c

index 1f717519270ea1c74e8e3b9fc6b5405e05a2aae8..04eaa863e7c91f56cb0fa96032104d1d8c589102 100644 (file)
@@ -1,3 +1,7 @@
+2020-01-20  Alan Modra  <amodra@gmail.com>
+
+       * arm-dis.c (print_insn_arm): Wrap 'T' value.
+
 2020-01-18  Nick Clifton  <nickc@redhat.com>
 
        * configure: Regenerate.
index c986b5897edaaf4d35ad3f7004d18409ba4aee10..be2a93253bb5673579780f2053161e281e64cb04 100644 (file)
@@ -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')
                              {
This page took 0.03386 seconds and 4 git commands to generate.