This is the mail archive of the binutils-cvs@sourceware.org mailing list for the binutils project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[binutils-gdb] Allow zero length archive elements


https://sourceware.org/git/gitweb.cgi?p=binutils-gdb.git;h=03ee85837ec2e10f7b67c417b17ab3ffa97a98d2

commit 03ee85837ec2e10f7b67c417b17ab3ffa97a98d2
Author: Alan Modra <amodra@gmail.com>
Date:   Wed Mar 9 16:10:53 2016 +1030

    Allow zero length archive elements
    
    	PR binutils/19775
    	* coff-alpha.c (alpha_ecoff_openr_next_archived_file): Allow zero
    	length elements in the archive.

Diff:
---
 bfd/ChangeLog    | 6 ++++++
 bfd/coff-alpha.c | 2 +-
 2 files changed, 7 insertions(+), 1 deletion(-)

diff --git a/bfd/ChangeLog b/bfd/ChangeLog
index fe08c02..fc63219 100644
--- a/bfd/ChangeLog
+++ b/bfd/ChangeLog
@@ -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
diff --git a/bfd/coff-alpha.c b/bfd/coff-alpha.c
index f69f22b..70388f7 100644
--- a/bfd/coff-alpha.c
+++ b/bfd/coff-alpha.c
@@ -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);


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]