* d30v-dis.c (print_insn): Check that operand index is valid
before attempting to access the operands array.
+2019-10-29 Nick Clifton <nickc@redhat.com>
+
+ * d30v-dis.c (print_insn): Check that operand index is valid
+ before attempting to access the operands array.
+
2019-10-29 Nick Clifton <nickc@redhat.com>
* ia64-opc.c (locate_opcode_ent): Prevent a negative shift when
#include "opcode/d30v.h"
#include "disassemble.h"
#include "opintl.h"
+#include "libiberty.h"
#define PC_MASK 0xFFFFFFFF
(*info->fprintf_func) (info->stream, "0x%x", val);
}
/* If there is another operand, then write a comma and space. */
- if (insn->form->operands[opind] && !(found_control && opind == 2))
+ if (opind < (int) ARRAY_SIZE (insn->form->operands)
+ && insn->form->operands[opind]
+ && !(found_control && opind == 2))
need_comma = 1;
}
if (need_paren)