Fix memory access violations uncovered by running the dlltool on fuzzed binaries.

PR binutils/17512
	* dlltool.c (scan_obj_file): Break loop if the last archive
	displayed matches the current archive.
This commit is contained in:
Nick Clifton 2015-01-07 17:33:17 +00:00
parent c88f5b8e49
commit d7b24d2941
2 changed files with 6 additions and 0 deletions

View file

@ -1,6 +1,9 @@
2015-01-07 Nick Clifton <nickc@redhat.com>
PR binutils/17512
* dlltool.c (scan_obj_file): Break loop if the last archive
displayed matches the current archive.
* objdump.c (display_any_bfd): Add a depth limit to nested archive
display in order to avoid infinite loops.
* srconv.c: Replace calls to abort with calls to fatal with an

View file

@ -1699,6 +1699,9 @@ scan_obj_file (const char *filename)
scan_open_obj_file (arfile);
next = bfd_openr_next_archived_file (f, arfile);
bfd_close (arfile);
/* PR 17512: file: 58715298. */
if (next == arfile)
break;
arfile = next;
}