projects
/
binutils-gdb.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
1f01799
)
PR28753, buffer overflow in read_section_stabs_debugging_info
author
Alan Modra
<amodra@gmail.com>
Thu, 20 Jan 2022 03:28:38 +0000
(13:58 +1030)
committer
Alan Modra
<amodra@gmail.com>
Fri, 28 Jan 2022 01:24:54 +0000
(11:54 +1030)
PR 28753
* rddbg.c (read_section_stabs_debugging_info): Don't read past
end of section when concatentating stab strings.
binutils/rddbg.c
patch
|
blob
|
history
diff --git
a/binutils/rddbg.c
b/binutils/rddbg.c
index 42605b83d1aedf63e4c7511a19b68662a0940025..169c52f498322bda956a9cd5764889e01ed3ece1 100644
(file)
--- 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 + 1
2 <
stabs + stabsize)
+ && stab + 1
6 <=
stabs + stabsize)
{
char *p;