aboutsummaryrefslogtreecommitdiff
path: root/bfd/archive.c
diff options
context:
space:
mode:
authorNick Clifton <nickc@redhat.com>2016-03-07 17:29:25 +0000
committerNick Clifton <nickc@redhat.com>2016-03-07 17:29:25 +0000
commit4fc874242f8f1bf17cf6e65b159dd804e793e6cd (patch)
tree270a038005096bd4ee9f8522926be270cfece2be /bfd/archive.c
parent23a4bd22c75862fdbaa5faef59b9094ec738f675 (diff)
downloadgdb-4fc874242f8f1bf17cf6e65b159dd804e793e6cd.zip
gdb-4fc874242f8f1bf17cf6e65b159dd804e793e6cd.tar.gz
gdb-4fc874242f8f1bf17cf6e65b159dd804e793e6cd.tar.bz2
Allow zero length archive elements.
bfd PR binutils/19775 * archive.c (bfd_generic_openr_next_archived_file): Allow zero length elements in the archive. binutils PR binutils/19775 * testsuite/binutils-all/ar.exp (proc empty_archive): New proc. Run the new proc. * testsuite/binutils-all/empty: New, empty, file.
Diffstat (limited to 'bfd/archive.c')
-rw-r--r--bfd/archive.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/bfd/archive.c b/bfd/archive.c
index 68c18bf..53e295e 100644
--- a/bfd/archive.c
+++ b/bfd/archive.c
@@ -802,7 +802,7 @@ bfd_generic_openr_next_archived_file (bfd *archive, bfd *last_file)
Note that last_file->origin can be odd in the case of
BSD-4.4-style element with a long odd 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);