XCOFF archive sanity check
authorAlan Modra <amodra@gmail.com>
Sat, 18 Mar 2023 06:04:08 +0000 (16:34 +1030)
committerAlan Modra <amodra@gmail.com>
Sun, 19 Mar 2023 11:49:19 +0000 (22:19 +1030)
commit99b847478c35b64ffddaf7af53c348217d037cb2
tree7a37877fec4a332562f213f37d5618fe8589f878
parent5f51eb9397768a6d93e523e05f5b7e8f78465c71
XCOFF archive sanity check

XCOFF archive elements are in a linked list.  Add a little more sanity
checking.  This of course doesn't stop the fuzzers finding a way to
make a loop, but this check is cheap.

* coff-rs6000.c (_bfd_xcoff_openr_next_archived_file): Sanity
check that next element isn't pointing back to the header.
bfd/coff-rs6000.c