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/users/hjl/linux/master] Fix memory access violations uncovered by running the dlltool on fuzzed binaries.


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

commit d7b24d2941fd7c99ba5843331989e6023075f0d0
Author: Nick Clifton <nickc@redhat.com>
Date:   Wed Jan 7 17:33:17 2015 +0000

    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.

Diff:
---
 binutils/ChangeLog | 3 +++
 binutils/dlltool.c | 3 +++
 2 files changed, 6 insertions(+)

diff --git a/binutils/ChangeLog b/binutils/ChangeLog
index 31a6696..17d2dd6 100644
--- a/binutils/ChangeLog
+++ b/binutils/ChangeLog
@@ -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
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;
 	}


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