public inbox for binutils@sourceware.org
 help / color / mirror / Atom feed
From: Alan Modra <amodra@gmail.com>
To: binutils@sourceware.org
Subject: objdump use of uninitialised value in pr_string_field
Date: Tue, 18 Apr 2023 10:55:51 +0930	[thread overview]
Message-ID: <ZD3xnwW1LKQe7Oqe@squeak.grove.modra.org> (raw)

	PR 30365
	* rdcoff.c (parse_coff_struct_type): Leave bitsize zero when no
	auxents.

diff --git a/binutils/rdcoff.c b/binutils/rdcoff.c
index 17e89e87d74..79fcfb21814 100644
--- a/binutils/rdcoff.c
+++ b/binutils/rdcoff.c
@@ -385,7 +385,8 @@ parse_coff_struct_type (bfd *abfd, struct coff_symbols *symbols,
 
 	case C_FIELD:
 	  bitpos = bfd_asymbol_value (sym);
-	  bitsize = auxent.x_sym.x_misc.x_lnsz.x_size;
+	  if (psubaux != NULL)
+	    bitsize = psubaux->x_sym.x_misc.x_lnsz.x_size;
 	  break;
 
 	case C_EOS:

-- 
Alan Modra
Australia Development Lab, IBM

                 reply	other threads:[~2023-04-18  1:25 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=ZD3xnwW1LKQe7Oqe@squeak.grove.modra.org \
    --to=amodra@gmail.com \
    --cc=binutils@sourceware.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).