nm: Stop processing ar members on first invalid offset.
authorMark Wielaard <mjw@redhat.com>
Fri, 26 Dec 2014 15:12:52 +0000 (16:12 +0100)
committerMark Wielaard <mjw@redhat.com>
Mon, 12 Jan 2015 21:04:44 +0000 (22:04 +0100)
Otherwise we will keep looping on that same invalid entry.

https://bugzilla.redhat.com/show_bug.cgi?id=1170810

Reported-by: Alexander Cherepanov <cherepan@mccme.ru>
Signed-off-by: Mark Wielaard <mjw@redhat.com>
src/ChangeLog
src/nm.c

index 7203dd9..18a038d 100644 (file)
@@ -1,3 +1,7 @@
+2014-12-26  Mark Wielaard  <mjw@redhat.com>
+
+       * nm.c (handle_ar): Break on arsym with invalid offset.
+
 2014-12-20  Mark Wielaard  <mjw@redhat.com>
 
        * readelf.c (print_debug_macinfo_section): Mark cus sentinel files
index 4f2e0e7..6a9f8e1 100644 (file)
--- a/src/nm.c
+++ b/src/nm.c
@@ -468,7 +468,7 @@ handle_ar (int fd, Elf *elf, const char *prefix, const char *fname,
                {
                  error (0, 0, gettext ("invalid offset %zu for symbol %s"),
                         arsym->as_off, arsym->as_name);
-                 continue;
+                 break;
                }
 
              printf (gettext ("%s in %s\n"), arsym->as_name, arhdr->ar_name);