]> git.ipfire.org Git - thirdparty/binutils-gdb.git/commitdiff
PR 33455 SEGV in vfinfo at ldmisc.c:527
authorAlan Modra <amodra@gmail.com>
Sun, 2 Nov 2025 22:33:37 +0000 (09:03 +1030)
committerAlan Modra <amodra@gmail.com>
Mon, 3 Nov 2025 00:29:41 +0000 (10:59 +1030)
A reloc howto set up with EMPTY_HOWTO has a NULL name.  More than one
place emitting diagnostics assumes a reloc howto won't have a NULL
name.

PR 33455
* coffcode.h (coff_slurp_reloc_table): Don't allow a howto with
a NULL name.

bfd/coffcode.h

index 1e5acc0032c018351aad9aaadebc8518fcfa8fea..ce1e39131b4dd74305458cea58e063476a2ffef9 100644 (file)
@@ -5345,7 +5345,7 @@ coff_slurp_reloc_table (bfd * abfd, sec_ptr asect, asymbol ** symbols)
       RTYPE2HOWTO (cache_ptr, &dst);
 #endif /* RELOC_PROCESSING */
 
-      if (cache_ptr->howto == NULL)
+      if (cache_ptr->howto == NULL || cache_ptr->howto->name == NULL)
        {
          _bfd_error_handler
            /* xgettext:c-format */