aboutsummaryrefslogtreecommitdiff
path: root/opcodes
diff options
context:
space:
mode:
authorNick Clifton <nickc@redhat.com>2017-06-14 17:10:28 +0100
committerNick Clifton <nickc@redhat.com>2017-06-14 17:10:28 +0100
commite64519d1ed7fd8f990f05a5562d5b5c0c44b7d7e (patch)
treed9019645ec5ccc6aaa68df6733be86f73c40755f /opcodes
parentf461bbd847f15657f3dd2f317c30c75a7520da1f (diff)
downloadgdb-e64519d1ed7fd8f990f05a5562d5b5c0c44b7d7e.zip
gdb-e64519d1ed7fd8f990f05a5562d5b5c0c44b7d7e.tar.gz
gdb-e64519d1ed7fd8f990f05a5562d5b5c0c44b7d7e.tar.bz2
Fix seg-fault when trying to disassemble a corrupt score binary.
PR binutils/21576 * score7-dis.c (score_opcodes): Add sentinel.
Diffstat (limited to 'opcodes')
-rw-r--r--opcodes/ChangeLog5
-rw-r--r--opcodes/score7-dis.c3
2 files changed, 7 insertions, 1 deletions
diff --git a/opcodes/ChangeLog b/opcodes/ChangeLog
index fa9bb75..14e2b7a 100644
--- a/opcodes/ChangeLog
+++ b/opcodes/ChangeLog
@@ -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.
diff --git a/opcodes/score7-dis.c b/opcodes/score7-dis.c
index c50a60f..8d0d969 100644
--- a/opcodes/score7-dis.c
+++ b/opcodes/score7-dis.c
@@ -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