From: Mark Wielaard Date: Sat, 3 Jul 2021 16:56:54 +0000 (+0200) Subject: readelf: Fix error message when two attribute names differ in in compare_listptr. X-Git-Tag: elfutils-0.186~69 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=e8b5a5e9d8b8a503755a8a48c23a64a695664270;p=thirdparty%2Felfutils.git readelf: Fix error message when two attribute names differ in in compare_listptr. We were printing the second attribute name twice. Print the first and second. Reported-by: Gabriel Valky Signed-off-by: Mark Wielaard --- diff --git a/src/ChangeLog b/src/ChangeLog index 71599e5d7..cfbcfd48b 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,3 +1,7 @@ +2021-07-03 Mark Wielaard + + * readelf.c (compare_listptr): Fix dwarf_attr_name argument. + 2021-06-18 Mark Wielaard * unstrip.c (adjust_relocs): Check gelf_getrel and geld_getrela. diff --git a/src/readelf.c b/src/readelf.c index 9b4726223..1f13f7651 100644 --- a/src/readelf.c +++ b/src/readelf.c @@ -4887,7 +4887,7 @@ compare_listptr (const void *a, const void *b) error (0, 0, _("%s %#" PRIx64 " used with different attribute %s and %s"), - name, (uint64_t) p1->offset, dwarf_attr_name (p2->attr), + name, (uint64_t) p1->offset, dwarf_attr_name (p1->attr), dwarf_attr_name (p2->attr)); } }