diff options
author | Alan Modra <amodra@gmail.com> | 2022-01-20 13:58:38 +1030 |
---|---|---|
committer | Alan Modra <amodra@gmail.com> | 2022-02-05 17:41:08 +1030 |
commit | cad4d6b91e97b6962807d33c04ed7e7797788438 (patch) | |
tree | 7f063820c1e638c6a1cb7a93f69221db033466fd /binutils | |
parent | 96aa81f8d5d269f2fc0c9f76b7536560f674843c (diff) |
PR28753, buffer overflow in read_section_stabs_debugging_info
PR 28753
* rddbg.c (read_section_stabs_debugging_info): Don't read past
end of section when concatentating stab strings.
(cherry picked from commit 085b299b71721e15f5c5c5344dc3e4e4536dadba)
Diffstat (limited to 'binutils')
-rw-r--r-- | binutils/rddbg.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/binutils/rddbg.c b/binutils/rddbg.c index 42605b83d1..169c52f498 100644 --- a/binutils/rddbg.c +++ b/binutils/rddbg.c @@ -210,7 +210,7 @@ read_section_stabs_debugging_info (bfd *abfd, asymbol **syms, long symcount, an attempt to read the byte before 'strings' would occur. */ while ((len = strlen (s)) > 0 && s[len - 1] == '\\' - && stab + 12 < stabs + stabsize) + && stab + 16 <= stabs + stabsize) { char *p; |