* [binutils-gdb] Fix null pointer dereference in process_debug_info()
@ 2024-04-03 10:19 Nick Clifton
0 siblings, 0 replies; only message in thread
From: Nick Clifton @ 2024-04-03 10:19 UTC (permalink / raw)
To: binutils-cvs
https://sourceware.org/git/gitweb.cgi?p=binutils-gdb.git;h=301bfc45abb5ea2824a4d1820183b58d0d67357d
commit 301bfc45abb5ea2824a4d1820183b58d0d67357d
Author: Nick Clifton <nickc@redhat.com>
Date: Wed Apr 3 11:19:33 2024 +0100
Fix null pointer dereference in process_debug_info()
Diff:
---
binutils/dwarf.c | 17 ++++++++++-------
1 file changed, 10 insertions(+), 7 deletions(-)
diff --git a/binutils/dwarf.c b/binutils/dwarf.c
index 92a07e00e9b..ce508d0315f 100644
--- a/binutils/dwarf.c
+++ b/binutils/dwarf.c
@@ -4248,14 +4248,17 @@ process_debug_info (struct dwarf_section * section,
compunit.cu_version,
debug_info_p);
- /* This check was in place before, keep it. */
- stemp = debug_info_p->rnglists_base;
- if (stemp < 0)
+ if (debug_info_p)
{
- warn (_("CU @ %#" PRIx64 " has has a negative rnglists_base "
- "value of %#" PRIx64 " - treating as zero"),
- debug_info_p->cu_offset, stemp);
- debug_info_p->rnglists_base = 0;
+ /* This check was in place before, keep it. */
+ stemp = debug_info_p->rnglists_base;
+ if (stemp < 0)
+ {
+ warn (_("CU @ %#" PRIx64 " has has a negative rnglists_base "
+ "value of %#" PRIx64 " - treating as zero"),
+ debug_info_p->cu_offset, stemp);
+ debug_info_p->rnglists_base = 0;
+ }
}
}
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2024-04-03 10:19 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2024-04-03 10:19 [binutils-gdb] Fix null pointer dereference in process_debug_info() Nick Clifton
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).