demand_copy_C_string NUL check
[binutils-gdb.git] / opcodes / ns32k-dis.c
index ccad820d8f3366eb3864e3fb43ca639fd86ebc03..34ef3b09881cc28a9feb2705ff7edcd64735ac30 100644 (file)
@@ -1,5 +1,5 @@
 /* Print National Semiconductor 32000 instructions.
-   Copyright (C) 1986-2020 Free Software Foundation, Inc.
+   Copyright (C) 1986-2021 Free Software Foundation, Inc.
 
    This file is part of the GNU opcodes library.
 
@@ -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;