PR28862, heap-buffer-overflow in parse_stab_string
authorAlan Modra <amodra@gmail.com>
Tue, 8 Feb 2022 09:51:01 +0000 (20:21 +1030)
committerAlan Modra <amodra@gmail.com>
Tue, 8 Feb 2022 09:58:52 +0000 (20:28 +1030)
commit481153777e278b71e694fd2db6b897f7a9e3dcb8
tree29e8d0620cdc67be420e7a87637377b029a87085
parentcb5a1d7db9050fe43ec559d47965e146239c0c34
PR28862, heap-buffer-overflow in parse_stab_string

I have no info on the format of a "SUNPRO C++ Namespace" stab, so am
relying on the previous code being correct in parsing these stabs.
Just don't allow NULs anywhere in the stab.

PR 28862
* stabs.c (parse_stab_string): Don't overrun buffer when parsing
'Y' stab.
binutils/stabs.c