aboutsummaryrefslogtreecommitdiff
path: root/opcodes
diff options
context:
space:
mode:
authorAlan Modra <amodra@gmail.com>2022-09-12 18:09:24 +0930
committerAlan Modra <amodra@gmail.com>2022-09-14 10:19:56 +0930
commitf15ba945a49b75c23f8133f3be170a681bb050de (patch)
treebb7408a94d0dc64c1e114a5cd63642315660faef /opcodes
parent365bf300da35c11e27bb8cdd3964f82e3d32f094 (diff)
downloadgdb-f15ba945a49b75c23f8133f3be170a681bb050de.zip
gdb-f15ba945a49b75c23f8133f3be170a681bb050de.tar.gz
gdb-f15ba945a49b75c23f8133f3be170a681bb050de.tar.bz2
ubsan: arm-dis.c index out of bounds
We are way off in the weeds with this one, and will be printing <UNPREDICTABLE> for S > 10. * arm-dis.c (print_insn_cde): Wrap 'T' value.
Diffstat (limited to 'opcodes')
-rw-r--r--opcodes/arm-dis.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/opcodes/arm-dis.c b/opcodes/arm-dis.c
index c1bf276..684c74f 100644
--- a/opcodes/arm-dis.c
+++ b/opcodes/arm-dis.c
@@ -8957,7 +8957,7 @@ print_insn_cde (struct disassemble_info *info, long given, bool thumb)
break;
case 'T':
- func (stream, "%s", arm_regnames[value + 1]);
+ func (stream, "%s", arm_regnames[(value + 1) & 15]);
break;
case 'd':