This is the mail archive of the
binutils-cvs@sourceware.org
mailing list for the binutils project.
[binutils-gdb] Fix displaying the value associated a GNU BUILD note that uses an ascii name.
- From: Nick Clifton <nickc at sourceware dot org>
- To: bfd-cvs at sourceware dot org
- Date: 17 Mar 2017 17:37:34 -0000
- Subject: [binutils-gdb] Fix displaying the value associated a GNU BUILD note that uses an ascii name.
https://sourceware.org/git/gitweb.cgi?p=binutils-gdb.git;h=0dd6ae21da832f351a3722d2f8bac187fc3bdfef
commit 0dd6ae21da832f351a3722d2f8bac187fc3bdfef
Author: Nick Clifton <nickc@redhat.com>
Date: Fri Mar 17 17:36:51 2017 +0000
Fix displaying the value associated a GNU BUILD note that uses an ascii name.
* readelf.c (print_gnu_build_attribute_name): Fix off by one error
printing the value for a build note with an ascii name.
Diff:
---
binutils/ChangeLog | 5 +++++
binutils/readelf.c | 2 +-
2 files changed, 6 insertions(+), 1 deletion(-)
diff --git a/binutils/ChangeLog b/binutils/ChangeLog
index 6084716..8fc5671 100644
--- a/binutils/ChangeLog
+++ b/binutils/ChangeLog
@@ -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
diff --git a/binutils/readelf.c b/binutils/readelf.c
index 5738fe5..ad65f07 100644
--- a/binutils/readelf.c
+++ b/binutils/readelf.c
@@ -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
{