]> git.ipfire.org Git - thirdparty/binutils-gdb.git/commitdiff
Fix PR binutils/19147 -- off by one when printing NT_FILE note.
authorPaul Pluzhnikov <ppluzhnikov@google.com>
Sun, 18 Oct 2015 16:39:25 +0000 (09:39 -0700)
committerPaul Pluzhnikov <ppluzhnikov@google.com>
Sun, 18 Oct 2015 16:39:25 +0000 (09:39 -0700)
binutils/ChangeLog
binutils/readelf.c

index 9433f3d7ef8bcfacc2d9b477a53c322ef554b9b8..512471c555a85c8ad1ffc6be31be66233e4f69da 100644 (file)
@@ -1,3 +1,8 @@
+2015-10-18  Paul Pluzhnikov  <ppluzhnikov@google.com>
+
+       PR binutils/19147
+       * readelf.c (print_core_note): Fix off-by-one bug.
+
 2015-10-15  Alan Modra  <amodra@gmail.com>
 
        * objcopy.c (copy_object): Don't omit bfd_copy_private_bfd_data
index e8c215d847435c21d236595257e54123ea229d3f..22cec2ce4e726f46d6d6ce762cd36a99516c035a 100644 (file)
@@ -15151,7 +15151,7 @@ print_core_note (Elf_Internal_Note *pnote)
          (int) (4 + 2 * addr_size), _("End"),
          (int) (4 + 2 * addr_size), _("Page Offset"));
   filenames = descdata + count * 3 * addr_size;
-  while (--count > 0)
+  while (count-- > 0)
     {
       bfd_vma start, end, file_ofs;