asan: ns32k: use of uninitialized value
authorAlan Modra <amodra@gmail.com>
Thu, 28 May 2020 08:06:31 +0000 (17:36 +0930)
committerAlan Modra <amodra@gmail.com>
Thu, 28 May 2020 11:41:32 +0000 (21:11 +0930)
* ns32k-dis.c (print_insn_arg): Handle d value of 'f' for
immediates.
(print_insn_ns32k): Revert last change.

opcodes/ChangeLog
opcodes/ns32k-dis.c

index 01892090697ae99e9bbcc431590fe1c202a63020..986761ed8c7cdd257e16430fa385e19156addac3 100644 (file)
@@ -1,3 +1,9 @@
+2020-05-28  Alan Modra  <amodra@gmail.com>
+
+       * ns32k-dis.c (print_insn_arg): Handle d value of 'f' for
+       immediates.
+       (print_insn_ns32k): Revert last change.
+
 2020-05-28  Nick Clifton  <nickc@redhat.com>
 
        * ns32k-dis.c (print_insn_ns32k): Change the arg_bufs array to
index ccad820d8f3366eb3864e3fb43ca639fd86ebc03..eac461a969269f057c7d6d23f19189639e55f30a 100644 (file)
@@ -524,9 +524,7 @@ print_insn_arg (int d,
          /* Immediate.  */
          switch (d)
            {
-           case 'I':
-           case 'Z':
-           case 'A':
+           default:
              /* I and Z are output operands and can`t be immediate
                 A is an address and we can`t have the address of
                 an immediate either. We don't know how much to increase
@@ -738,10 +736,7 @@ print_insn_ns32k (bfd_vma memaddr, disassemble_info *info)
   unsigned short first_word;
   int ioffset;         /* Bits into instruction.  */
   int aoffset;         /* Bits into arguments.  */
-  /* The arg_bufs array is made static in order to avoid a potential
-     use of an uninitialised value if we are asekd to disassemble a
-     corrupt instruction.  */
-  static char arg_bufs[MAX_ARGS+1][ARG_LEN];
+  char arg_bufs[MAX_ARGS+1][ARG_LEN];
   int argnum;
   int maxarg;
   struct private priv;
This page took 0.024762 seconds and 4 git commands to generate.