Fix array overrun when disassembling corrupt TIC30 binaries.
authorNick Clifton <nickc@redhat.com>
Tue, 29 Oct 2019 15:35:30 +0000 (15:35 +0000)
committerNick Clifton <nickc@redhat.com>
Tue, 29 Oct 2019 15:35:30 +0000 (15:35 +0000)
* tic30-dis.c (print_branch): Correct size of operand array.

opcodes/ChangeLog
opcodes/tic30-dis.c

index ae2e00ce9b65ad022f5fe7a4981e40a3c7cd2e1f..cadb065de15ca68093a4e90fb7b40db37cadcf2d 100644 (file)
@@ -1,3 +1,7 @@
+2019-10-29  Nick Clifton  <nickc@redhat.com>
+
+       * tic30-dis.c (print_branch): Correct size of operand array.
+
 2019-10-29  Nick Clifton  <nickc@redhat.com>
 
        * d30v-dis.c (print_insn): Check that operand index is valid
index a28be8307f8190c596bf3913cfc625d53401d2e2..29948f40196f029dccc62e2668a4718f01d06023 100644 (file)
@@ -607,7 +607,7 @@ print_branch (disassemble_info *info,
              unsigned long insn_word,
              struct instruction *insn)
 {
-  char operand[2][13] =
+  char operand[2][OPERAND_BUFFER_LEN] =
   {
     {0},
     {0}