aboutsummaryrefslogtreecommitdiff
path: root/binutils
diff options
context:
space:
mode:
Diffstat (limited to 'binutils')
-rw-r--r--binutils/ChangeLog6
-rw-r--r--binutils/objdump.c10
2 files changed, 15 insertions, 1 deletions
diff --git a/binutils/ChangeLog b/binutils/ChangeLog
index 7404a15..845eed4 100644
--- a/binutils/ChangeLog
+++ b/binutils/ChangeLog
@@ -1,3 +1,9 @@
+2014-12-09 Nick Clifton <nickc@redhat.com>
+
+ PR binutils/17512
+ * objdump.c (display_any_bfd): Avoid infinite loop closing and
+ opening the same archive again and again.
+
2014-12-09 Chen Gang <gang.chen.5i5j@gmail.com>
* windres.c (open_file_search): Free path buffer on failure.
diff --git a/binutils/objdump.c b/binutils/objdump.c
index b43d111..ee3a084 100644
--- a/binutils/objdump.c
+++ b/binutils/objdump.c
@@ -3426,7 +3426,15 @@ display_any_bfd (bfd *file, int level)
display_any_bfd (arfile, level + 1);
if (last_arfile != NULL)
- bfd_close (last_arfile);
+ {
+ bfd_close (last_arfile);
+ /* PR 17512: file: ac585d01. */
+ if (arfile == last_arfile)
+ {
+ last_arfile = NULL;
+ break;
+ }
+ }
last_arfile = arfile;
}