asan: som_set_reloc_info heap buffer overflow
authorAlan Modra <amodra@gmail.com>
Mon, 12 Sep 2022 09:45:01 +0000 (19:15 +0930)
committerAlan Modra <amodra@gmail.com>
Wed, 14 Sep 2022 00:49:57 +0000 (10:19 +0930)
commitacfd5524fa47a96bda305ea79c6b77c201930814
tree59d5e3f0020ee118bc1f828bf300f5b35d861bc9
parent72e366db620f5b2264290d9ba3b62df74bd0c40b
asan: som_set_reloc_info heap buffer overflow

Also a bugfix.  The first time the section was read, the contents
didn't supply an addend.

* som.c (som_set_reloc_info): Sanity check offset.  Do process
contents after reading.  Tidy section->contents after freeing.
bfd/som.c