Fix potential array overruns when disassembling corrupt v850 binaries.
authorNick Clifton <nickc@redhat.com>
Mon, 4 Nov 2019 12:02:20 +0000 (12:02 +0000)
committerNick Clifton <nickc@redhat.com>
Mon, 4 Nov 2019 12:02:20 +0000 (12:02 +0000)
commit5103274ffc537711574f9611cb64c51fa9a65546
tree0edb06903916adcdee98f7f30ba471f894e36805
parent64f52b3ec1853d14293d5a461d7abc8bde5e3f62
Fix potential array overruns when disassembling corrupt v850 binaries.

* v850-dis.c (get_v850_sreg_name): New function.  Returns the name
of a v850 system register.  Move the v850_sreg_names array into
this function.
(get_v850_reg_name): Likewise for ordinary register names.
(get_v850_vreg_name): Likewise for vector register names.
(get_v850_cc_name): Likewise for condition codes.
* get_v850_float_cc_name): Likewise for floating point condition
codes.
(get_v850_cacheop_name): Likewise for cache-ops.
(get_v850_prefop_name): Likewise for pref-ops.
(disassemble): Use the new accessor functions.
opcodes/ChangeLog
opcodes/v850-dis.c