From: Alan Modra Date: Mon, 12 Sep 2022 08:39:24 +0000 (+0930) Subject: ubsan: arm-dis.c index out of bounds X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=f15ba945a49b75c23f8133f3be170a681bb050de;p=binutils-gdb.git ubsan: arm-dis.c index out of bounds We are way off in the weeds with this one, and will be printing for S > 10. * arm-dis.c (print_insn_cde): Wrap 'T' value. --- diff --git a/opcodes/arm-dis.c b/opcodes/arm-dis.c index c1bf276b423..684c74f7f20 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':