asan: heap buffer overflow in _bfd_error_handler
authorAlan Modra <amodra@gmail.com>
Sat, 6 Aug 2022 10:24:46 +0000 (19:54 +0930)
committerAlan Modra <amodra@gmail.com>
Sat, 6 Aug 2022 10:29:02 +0000 (19:59 +0930)
commit45c8663b92cc29eb330dbcc6c500fa798f05ae37
tree877469fc158cb740d356c70dc536d29e19f43997
parent431d48ef288983b62df2afb435dc8c6101a34cf8
asan: heap buffer overflow in _bfd_error_handler

On coff_slurp_symbol_table printing "unrecognized storage class"
for a symbol error.  If the symbol name is the last string in its
section and not terminated, we run off the end of the buffer.

* coffgen.c (build_debug_section): Terminate the section with
an extra 0.
bfd/coffgen.c