diff options
author | Nick Clifton <nickc@redhat.com> | 2015-01-07 17:33:17 +0000 |
---|---|---|
committer | Nick Clifton <nickc@redhat.com> | 2015-01-07 17:33:17 +0000 |
commit | d7b24d2941fd7c99ba5843331989e6023075f0d0 (patch) | |
tree | 09af9e831a11b067800c3ae1c9e04a1c40f0389f /binutils/dlltool.c | |
parent | c88f5b8e495889f5d281a17bd56340d9a0e4cff6 (diff) | |
download | gdb-d7b24d2941fd7c99ba5843331989e6023075f0d0.zip gdb-d7b24d2941fd7c99ba5843331989e6023075f0d0.tar.gz gdb-d7b24d2941fd7c99ba5843331989e6023075f0d0.tar.bz2 |
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.
Diffstat (limited to 'binutils/dlltool.c')
-rw-r--r-- | binutils/dlltool.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/binutils/dlltool.c b/binutils/dlltool.c index 7b0a3ce..10204b0 100644 --- a/binutils/dlltool.c +++ b/binutils/dlltool.c @@ -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; } |