]> git.ipfire.org Git - thirdparty/binutils-gdb.git/commitdiff
Fix abort when running tools on a bogus binary.
authorNick Clifton <nickc@redhat.com>
Mon, 5 Dec 2016 14:59:02 +0000 (14:59 +0000)
committerNick Clifton <nickc@redhat.com>
Mon, 5 Dec 2016 14:59:02 +0000 (14:59 +0000)
PR binutils/20907
* peicode.h (pe_ILF_build_a_bfd): Replace abort with error return.

bfd/ChangeLog
bfd/peicode.h

index 7388bb289a9f383974086c3901c5561661aa3fac..8dc48b347f6b1d64004794d8604875c3bcb4d7f4 100644 (file)
@@ -5,6 +5,9 @@
 
 2016-12-05  Nick Clifton  <nickc@redhat.com>
 
+       PR binutils/20907
+       * peicode.h (pe_ILF_build_a_bfd): Replace abort with error return.
+
        PR binutils/20921
        * aoutx.h (squirt_out_relocs): Check for and report any relocs
        that could not be recognised.
index 9f98f866b241f887981134cecdaa4f658482a11c..ee47a6779707a34b88abccecb3f32be6f2915ffc 100644 (file)
@@ -892,8 +892,8 @@ pe_ILF_build_a_bfd (bfd *           abfd,
   if (import_name_type == IMPORT_ORDINAL)
     {
       if (ordinal == 0)
-       /* XXX - treat as IMPORT_NAME ??? */
-       abort ();
+       /* See PR 20907 for a reproducer.  */
+       goto error_return;
 
 #ifdef COFF_WITH_pex64
       ((unsigned int *) id4->contents)[0] = ordinal;