Allow zero length archive elements
authorAlan Modra <amodra@gmail.com>
Wed, 9 Mar 2016 05:40:53 +0000 (16:10 +1030)
committerAlan Modra <amodra@gmail.com>
Wed, 9 Mar 2016 06:24:24 +0000 (16:54 +1030)
PR binutils/19775
* coff-alpha.c (alpha_ecoff_openr_next_archived_file): Allow zero
length elements in the archive.

bfd/ChangeLog
bfd/coff-alpha.c

index fe08c0280c366032c5f1dc5d59308b335cab45b4..fc632192682100eefc7f3cf8f7fcb2e5de40138c 100644 (file)
@@ -1,3 +1,9 @@
+2016-03-09  Alan Modra  <amodra@gmail.com>
+
+       PR binutils/19775
+       * coff-alpha.c (alpha_ecoff_openr_next_archived_file): Allow zero
+       length elements in the archive.
+
 2016-03-08  H.J. Lu  <hongjiu.lu@intel.com>
 
        PR ld/19789
index f69f22b371d412f9d536facc6a77de683869b08c..70388f7db02ca41af5b3178be4aa79ae8b7c2ad7 100644 (file)
@@ -2208,7 +2208,7 @@ alpha_ecoff_openr_next_archived_file (bfd *archive, bfd *last_file)
         BSD-4.4-style element with a long odd size.  */
       filestart = last_file->proxy_origin + size;
       filestart += filestart % 2;
-      if (filestart <= last_file->proxy_origin)
+      if (filestart < last_file->proxy_origin)
        {
          /* Prevent looping.  See PR19256.  */
          bfd_set_error (bfd_error_malformed_archive);