This is the mail archive of the
binutils@sourceware.org
mailing list for the binutils project.
Commit: readelf: Fix off by one error printing a gnu build note name
- From: Nick Clifton <nickc at redhat dot com>
- To: binutils at sourceware dot org
- Date: Fri, 17 Mar 2017 17:36:30 +0000
- Subject: Commit: readelf: Fix off by one error printing a gnu build note name
- Authentication-results: sourceware.org; auth=none
- Authentication-results: ext-mx04.extmail.prod.ext.phx2.redhat.com; dmarc=none (p=none dis=none) header.from=redhat.com
- Authentication-results: ext-mx04.extmail.prod.ext.phx2.redhat.com; spf=pass smtp.mailfrom=nickc at redhat dot com
- Dkim-filter: OpenDKIM Filter v2.11.0 mx1.redhat.com 99D0980480
- Dmarc-filter: OpenDMARC Filter v1.3.2 mx1.redhat.com 99D0980480
Hi Guys,
I am checking in the patch below to fix an off by one error when
printing the value associated with an ascii name in a GNU BUILD note.
Cheers
Nick
binutils/ChangeLog
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.
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
{