]> git.ipfire.org Git - thirdparty/binutils-gdb.git/commit
tidy elf attr error handling
authorAlan Modra <amodra@gmail.com>
Tue, 10 Feb 2026 00:16:47 +0000 (10:46 +1030)
committerAlan Modra <amodra@gmail.com>
Tue, 10 Feb 2026 00:16:47 +0000 (10:46 +1030)
commit50c25f4ed4c1cdccf02f5c3c478f44f313243e11
treef56c766871ee2ecc8b52f08fa1756fb29ad5a1ef
parent7b7fd9f36112a7710201fcd88868c36935a21c39
tidy elf attr error handling

Add a missing error check, and make another error check a little more
stringent.  If it were ever possible for oav2_parse_attr to return
zero, the loop would not terminate.

* elf-attrs.c (oav2_parse_subsection): Check read_ntbs return
for errors.  Tidy loop reading attrs, and error on <= 0.
bfd/elf-attrs.c