From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 1062) id 2484B385840F; Tue, 18 Apr 2023 01:50:18 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 2484B385840F Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable From: Alan Modra To: bfd-cvs@sourceware.org Subject: [binutils-gdb] objdump use of uninitialised value in pr_string_field X-Act-Checkin: binutils-gdb X-Git-Author: Alan Modra X-Git-Refname: refs/heads/master X-Git-Oldrev: 34d63622f677b577b927debb1d6fd2bfef4422bd X-Git-Newrev: 341eba4f9d4f39c8bd08ff59120662e86a3de305 Message-Id: <20230418015018.2484B385840F@sourceware.org> Date: Tue, 18 Apr 2023 01:50:18 +0000 (GMT) X-BeenThere: binutils-cvs@sourceware.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Binutils-cvs mailing list List-Unsubscribe: , List-Archive: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 18 Apr 2023 01:50:18 -0000 https://sourceware.org/git/gitweb.cgi?p=3Dbinutils-gdb.git;h=3D341eba4f9d4f= 39c8bd08ff59120662e86a3de305 commit 341eba4f9d4f39c8bd08ff59120662e86a3de305 Author: Alan Modra Date: Tue Apr 18 10:22:08 2023 +0930 objdump use of uninitialised value in pr_string_field =20 PR 30365 * rdcoff.c (parse_coff_struct_type): Leave bitsize zero when no auxents. Diff: --- binutils/rdcoff.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) 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, =20 case C_FIELD: bitpos =3D bfd_asymbol_value (sym); - bitsize =3D auxent.x_sym.x_misc.x_lnsz.x_size; + if (psubaux !=3D NULL) + bitsize =3D psubaux->x_sym.x_misc.x_lnsz.x_size; break; =20 case C_EOS: