Allow zero length archive elements

PR binutils/19775
	* coff-alpha.c (alpha_ecoff_openr_next_archived_file): Allow zero
	length elements in the archive.
This commit is contained in:
Alan Modra 2016-03-09 16:10:53 +10:30
parent 9c1d7a0876
commit 03ee85837e
2 changed files with 7 additions and 1 deletions

View 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

View 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);