Fix seg-fault when trying to disassemble a corrupt score binary.
authorNick Clifton <nickc@redhat.com>
Wed, 14 Jun 2017 16:10:28 +0000 (17:10 +0100)
committerNick Clifton <nickc@redhat.com>
Wed, 14 Jun 2017 16:10:28 +0000 (17:10 +0100)
PR binutils/21576
* score7-dis.c (score_opcodes): Add sentinel.

opcodes/ChangeLog
opcodes/score7-dis.c

index fa9bb75ab8868ddcbf43d4cd47fc87951fbf6835..14e2b7a2758a106f7d5fcc732cf4835c1a59add6 100644 (file)
@@ -1,3 +1,8 @@
+2017-06-14  Nick Clifton  <nickc@redhat.com>
+
+       PR binutils/21576
+       * score7-dis.c (score_opcodes): Add sentinel.
+
 2017-06-14  Yao Qi  <yao.qi@linaro.org>
 
        * aarch64-dis.c: Include disassemble.h instead of dis-asm.h.
index c50a60fd1092e4f43c0cf5726a6869734b1e5024..8d0d969d43346d9867a6badef62a8505cf1f055e 100644 (file)
@@ -513,7 +513,8 @@ static struct score_opcode score_opcodes[] =
   {0x00000d05, 0x00007f0f, "tvc!"},
   {0x00000026, 0x3e0003ff, "xor\t\t%20-24r, %15-19r, %10-14r"},
   {0x00000027, 0x3e0003ff, "xor.c\t\t%20-24r, %15-19r, %10-14r"},
-  {0x00002007, 0x0000700f, "xor!\t\t%8-11r, %4-7r"}
+  {0x00002007, 0x0000700f, "xor!\t\t%8-11r, %4-7r"},
+  { 0, 0, NULL }
 };
 
 typedef struct