Fix displaying the value associated a GNU BUILD note that uses an ascii name.
authorNick Clifton <nickc@redhat.com>
Fri, 17 Mar 2017 17:36:51 +0000 (17:36 +0000)
committerNick Clifton <nickc@redhat.com>
Fri, 17 Mar 2017 17:36:51 +0000 (17:36 +0000)
* readelf.c (print_gnu_build_attribute_name): Fix off by one error
printing the value for a build note with an ascii name.

binutils/ChangeLog
binutils/readelf.c

index 60847160d6b4eb05081a6bfac6bc9e828cb8f1a8..8fc567196befa392db99e647ae7f15a3abfb8777 100644 (file)
@@ -1,3 +1,8 @@
+2017-03-17  Nick Clifton  <nickc@redhat.com>
+
+       * readelf.c (print_gnu_build_attribute_name): Fix off by one error
+       printing the value for a build note with an ascii name.
+
 2017-03-16  Nick Clifton  <nickc@redhat.com>
 
        * readelf.c (print_gnu_build_attribute_name): Add support for
index 5738fe59e210cb95209706de25fe2b90c692be43..ad65f076606c32211ee829f51c7e815bcc45967b 100644 (file)
@@ -16848,7 +16848,7 @@ print_gnu_build_attribute_name (Elf_Internal_Note * pnote)
            len = left;
          printf ("%.*s ", len, name);
          left -= len;
-         name += len + 1;
+         name += len;
        }
       else
        {