* Another sanity check for read_section_stabs_debugging_info
@ 2023-03-19 11:51 Alan Modra
0 siblings, 0 replies; only message in thread
From: Alan Modra @ 2023-03-19 11:51 UTC (permalink / raw)
To: binutils
* rddbg.c (read_section_stabs_debugging_info): Ignore invalid
stab sections with size less than 12 bytes.
diff --git a/binutils/rddbg.c b/binutils/rddbg.c
index 1a888778312..15081c3f7c7 100644
--- 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)
{
--
Alan Modra
Australia Development Lab, IBM
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2023-03-19 11:51 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-03-19 11:51 Another sanity check for read_section_stabs_debugging_info Alan Modra
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).