Prevent an illegal memory access in the xgate disassembler.
authorNick Clifton <nickc@redhat.com>
Mon, 28 Oct 2019 15:06:32 +0000 (15:06 +0000)
committerNick Clifton <nickc@redhat.com>
Mon, 28 Oct 2019 15:06:32 +0000 (15:06 +0000)
* xgate-dis.c (print_insn): Fix decoding of the XGATE_OP_DYA
operand.

opcodes/ChangeLog
opcodes/xgate-dis.c

index 74f1db2aa6f8097ac1586fe00f3be9e7cdaf2bc4..66df91109e2eca48eeb6207e415c6925501293c6 100644 (file)
@@ -1,3 +1,8 @@
+2019-10-28  Nick Clifton  <nickc@redhat.com>
+
+       * xgate-dis.c (print_insn): Fix decoding of the XGATE_OP_DYA
+       operand.
+
 2019-10-25  Nick Clifton  <nickc@redhat.com>
 
        * rx-dis.c (print_insn_rx): Use parenthesis to ensure correct
index f7ae013212a0574b9dd47feb1c0b57c7f9587dc9..ee88bf9c32819016220b249eda19a3fc79ca008f 100644 (file)
@@ -169,8 +169,8 @@ print_insn (bfd_vma memaddr, struct disassemble_info* info)
             }
           else if (!strcmp (decodePTR->opcodePTR->constraints, XGATE_OP_DYA))
             {
-                 operandOne = ripBits (&operMaskReg, 3, opcodePTR, raw_code);
-                 operandTwo = ripBits (&operMaskReg, 3, opcodePTR, raw_code);
+                 operandOne = ripBits (&operMaskReg, 3, decodePTR->opcodePTR, raw_code);
+                 operandTwo = ripBits (&operMaskReg, 3, decodePTR->opcodePTR, raw_code);
                 ( *info->fprintf_func)(info->stream, " R%x, R%x", operandOne,
                      operandTwo);
             }
@@ -259,7 +259,7 @@ print_insn (bfd_vma memaddr, struct disassemble_info* info)
           else
             {
               (*info->fprintf_func)(info->stream, " unhandled mode %s",
-                opcodePTR->constraints);
+                                   decodePTR->opcodePTR->constraints);
             }
           perviousBin = raw_code;
         }
This page took 0.032402 seconds and 4 git commands to generate.