]> git.ipfire.org Git - thirdparty/elfutils.git/commitdiff
readelf: Fix error message when two attribute names differ in in compare_listptr.
authorMark Wielaard <mark@klomp.org>
Sat, 3 Jul 2021 16:56:54 +0000 (18:56 +0200)
committerMark Wielaard <mark@klomp.org>
Sat, 3 Jul 2021 16:56:54 +0000 (18:56 +0200)
We were printing the second attribute name twice. Print the first and second.

Reported-by: Gabriel Valky <gvalky@tachyum.com>
Signed-off-by: Mark Wielaard <mark@klomp.org>
src/ChangeLog
src/readelf.c

index 71599e5d73fa5ff079dd152b8806783e1c6ea83c..cfbcfd48bbfb6a5c7e1da1ee221218ff7ab8fb6b 100644 (file)
@@ -1,3 +1,7 @@
+2021-07-03  Mark Wielaard  <mark@klomp.org>
+
+       * readelf.c (compare_listptr): Fix dwarf_attr_name argument.
+
 2021-06-18  Mark Wielaard  <mark@klomp.org>
 
        * unstrip.c (adjust_relocs): Check gelf_getrel and geld_getrela.
index 9b4726223c1307675bc1abee8fb61545ad04b04b..1f13f765154dc0358a3848ce43ba441e60d4792d 100644 (file)
@@ -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));
        }
     }