]> git.ipfire.org Git - thirdparty/binutils-gdb.git/commit
rescoff: ensure file is PE
authorAlan Modra <amodra@gmail.com>
Thu, 27 Feb 2025 10:23:43 +0000 (20:53 +1030)
committerAlan Modra <amodra@gmail.com>
Mon, 3 Mar 2025 21:53:16 +0000 (08:23 +1030)
commit7166166ec098b998dbd48e90be40ce880f7d46de
tree4b557ce47a1c4ebd8f7d1ac08fa30fcfbffc8417
parent11b6914ce6e680d836dfb711ed7d787113c4c656
rescoff: ensure file is PE

read_coff_rsrc makes one check on object file contents, the existence
of a .rsrc section.  It doesn't check that the file is PE but blindly
accesses bfd pe_data.  Fix that by adding the necessary checks.
Also, the "resources nest too deep" error isn't an overrun, ie. the
"address out of bounds" message isn't correct.  Fix that too.
binutils/rescoff.c