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.
This commit is contained in:
Alan Modra
2022-09-12 18:09:24 +09:30
parent 365bf300da
commit f15ba945a4

View File

@@ -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':