From: Alan Modra Date: Mon, 8 Nov 2021 22:32:22 +0000 (+1030) Subject: PR28543, readelf entered an infinite loop X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=84f82c95bcd48042437bfd08c77866414c69476f;p=binutils-gdb.git PR28543, readelf entered an infinite loop This little tweak terminates fuzzed binary readelf output a little quicker. PR 28543 * dwarf.c (read_and_display_attr_value): Consume a byte when form is unrecognized. --- diff --git a/binutils/dwarf.c b/binutils/dwarf.c index d80235fb206..ce54813a076 100644 --- a/binutils/dwarf.c +++ b/binutils/dwarf.c @@ -2743,6 +2743,8 @@ read_and_display_attr_value (unsigned long attribute, default: warn (_("Unrecognized form: 0x%lx\n"), form); + /* What to do? Consume a byte maybe? */ + ++data; break; }