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:
027333d
)
Another sanity check for read_section_stabs_debugging_info
author
Alan Modra
<amodra@gmail.com>
Sat, 18 Mar 2023 02:05:15 +0000
(12:35 +1030)
committer
Alan Modra
<amodra@gmail.com>
Sun, 19 Mar 2023 11:49:19 +0000
(22:19 +1030)
* rddbg.c (read_section_stabs_debugging_info): Ignore invalid
stab sections with size less than 12 bytes.
binutils/rddbg.c
patch
|
blob
|
history
diff --git
a/binutils/rddbg.c
b/binutils/rddbg.c
index 1a888778312e218629769bab69a1c0ba578d165e..15081c3f7c72c39ee59f373850991e5b1ce49f87 100644
(file)
--- a/
binutils/rddbg.c
+++ b/
binutils/rddbg.c
@@
-119,6
+119,7
@@
read_section_stabs_debugging_info (bfd *abfd, asymbol **syms, long symcount,
strsec = bfd_get_section_by_name (abfd, names[i].strsecname);
if (sec != NULL
&& (bfd_section_flags (sec) & SEC_HAS_CONTENTS) != 0
+ && bfd_section_size (sec) >= 12
&& strsec != NULL
&& (bfd_section_flags (strsec) & SEC_HAS_CONTENTS) != 0)
{