objdump use of uninitialised value in pr_string_field
authorAlan Modra <amodra@gmail.com>
Tue, 18 Apr 2023 00:52:08 +0000 (10:22 +0930)
committerAlan Modra <amodra@gmail.com>
Tue, 18 Apr 2023 00:54:41 +0000 (10:24 +0930)
PR 30365
* rdcoff.c (parse_coff_struct_type): Leave bitsize zero when no
auxents.

binutils/rdcoff.c

index 17e89e87d747e20e570569489a9217ba96510780..79fcfb21814fbc6fdef786606846d9b65a57d77d 100644 (file)
@@ -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: