diff options
author | John Darrington <john@darrington.wattle.id.au> | 2019-01-04 09:44:58 +0100 |
---|---|---|
committer | John Darrington <john@darrington.wattle.id.au> | 2019-01-09 19:47:06 +0100 |
commit | 448b8ca86519cce1216c9db5f0236604a6a33320 (patch) | |
tree | bff31676ee1c6972f2c87ff582a2ca7844494531 /opcodes/ChangeLog | |
parent | S12Z: Fix disassembly of indexed OPR operands with zero index. (diff) | |
download | binutils-gdb-448b8ca86519cce1216c9db5f0236604a6a33320.tar.gz binutils-gdb-448b8ca86519cce1216c9db5f0236604a6a33320.tar.bz2 binutils-gdb-448b8ca86519cce1216c9db5f0236604a6a33320.zip |
S12Z: Don't crash when disassembling invalid instructions.
Check for null before dereferencing an operand pointer. Normally
this situation should never arise, but could happen if a "partial"
instruction is encountered at the end of a file or section.
opcodes/
* s12z-dis.c (print_insn_s12z): Do not dereference an
operand if it is null.
Diffstat (limited to 'opcodes/ChangeLog')
-rw-r--r-- | opcodes/ChangeLog | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/opcodes/ChangeLog b/opcodes/ChangeLog index d17ee102202..cf7d55eb3f2 100644 --- a/opcodes/ChangeLog +++ b/opcodes/ChangeLog @@ -1,6 +1,8 @@ 2019-01-09 John Darrington <john@darrington.wattle.id.au> - * s12z-dis.c (opr_emit_disassembly): Do not omit an index if it is + * s12z-dis.c (print_insn_s12z): Do not dereference an operand + if it is null. + -dis.c (opr_emit_disassembly): Do not omit an index if it is zero. 2019-01-09 Andrew Paprocki <andrew@ishiboo.com> |