public inbox for binutils@sourceware.org
 help / color / mirror / Atom feed
* asan: ns32k: use of uninitialized value
@ 2020-05-28 11:40 Alan Modra
  0 siblings, 0 replies; only message in thread
From: Alan Modra @ 2020-05-28 11:40 UTC (permalink / raw)
  To: binutils

Nick, I had this one fixed, likely before you got out of bed this
morning, but not pushed upstream.

	* ns32k-dis.c (print_insn_arg): Handle d value of 'f' for
	immediates.
	(print_insn_ns32k): Revert last change.

diff --git a/opcodes/ns32k-dis.c b/opcodes/ns32k-dis.c
index ccad820d8f..eac461a969 100644
--- a/opcodes/ns32k-dis.c
+++ b/opcodes/ns32k-dis.c
@@ -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;

-- 
Alan Modra
Australia Development Lab, IBM

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2020-05-28 11:40 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-05-28 11:40 asan: ns32k: use of uninitialized value Alan Modra

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).