Fix memory access violations uncovered by running the dlltool on fuzzed binaries.
authorNick Clifton <nickc@redhat.com>
Wed, 7 Jan 2015 17:33:17 +0000 (17:33 +0000)
committerNick Clifton <nickc@redhat.com>
Wed, 7 Jan 2015 17:33:17 +0000 (17:33 +0000)
PR binutils/17512
* dlltool.c (scan_obj_file): Break loop if the last archive
displayed matches the current archive.

binutils/ChangeLog
binutils/dlltool.c

index 31a66963c5ff71d52ee2365cfb822df8d7dbca58..17d2dd670dbce88e9fcc4edad42bf027a215bd10 100644 (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
index 7b0a3cefe3ab2acf0461ebfe9a36619c2ea0c7c5..10204b08885340a2a9af958a9eb7a3f6ee2226e5 100644 (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;
        }
 
This page took 0.033061 seconds and 4 git commands to generate.