S12Z: Don't crash when disassembling invalid instructions.
authorJohn Darrington <john@darrington.wattle.id.au>
Fri, 4 Jan 2019 08:44:58 +0000 (09:44 +0100)
committerJohn Darrington <john@darrington.wattle.id.au>
Wed, 9 Jan 2019 18:47:06 +0000 (19:47 +0100)
commit448b8ca86519cce1216c9db5f0236604a6a33320
treebff31676ee1c6972f2c87ff582a2ca7844494531
parent39f286cd585226ad98c2cd94ee0f96988b3696ce
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.
opcodes/ChangeLog
opcodes/s12z-dis.c