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.
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>
(struct mem_read_abstraction_base *) &mra);
(info->fprintf_func) (info->stream, "%s", mnemonics[(long)operator]);
-
+
/* Ship out size sufficies for those instructions which
need them. */
if (osize == -1)
bool suffix = false;
for (o = 0; o < n_operands; ++o)
{
- if (operands[o]->osize != -1)
+ if (operands[o] && operands[o]->osize != -1)
{
if (!suffix)
{