* [COMMITTED] libdwelf: Check the d_buf actually exists in dwelf_elf_gnu_debuglink.
@ 2014-11-14 16:01 Mark Wielaard
0 siblings, 0 replies; only message in thread
From: Mark Wielaard @ 2014-11-14 16:01 UTC (permalink / raw)
To: elfutils-devel
[-- Attachment #1: Type: text/plain, Size: 1168 bytes --]
Signed-off-by: Mark Wielaard <mjw@redhat.com>
---
libdwelf/ChangeLog | 5 +++++
libdwelf/dwelf_elf_gnu_debuglink.c | 2 +-
2 files changed, 6 insertions(+), 1 deletion(-)
diff --git a/libdwelf/ChangeLog b/libdwelf/ChangeLog
index 9f95ea8..342cb9c 100644
--- a/libdwelf/ChangeLog
+++ b/libdwelf/ChangeLog
@@ -1,3 +1,8 @@
+2014-11-14 Mark Wielaard <mjw@redhat.com>
+
+ * dwelf_elf_gnu_debuglink.c (dwelf_elf_gnu_debuglink): Check d_buf
+ is not NULL.
+
2014-04-30 Mark Wielaard <mjw@redhat.com>
* Makefile.am (AM_CPPFLAGS): Add libdwfl and libebl include dirs.
diff --git a/libdwelf/dwelf_elf_gnu_debuglink.c b/libdwelf/dwelf_elf_gnu_debuglink.c
index 7b5fc93..6e22cf6 100644
--- a/libdwelf/dwelf_elf_gnu_debuglink.c
+++ b/libdwelf/dwelf_elf_gnu_debuglink.c
@@ -60,7 +60,7 @@ dwelf_elf_gnu_debuglink (Elf *elf, GElf_Word *crc)
/* Found the .gnu_debuglink section. Extract its contents. */
Elf_Data *rawdata = elf_rawdata (scn, NULL);
- if (rawdata == NULL)
+ if (rawdata == NULL || rawdata->d_buf == NULL)
return NULL;
/* The CRC comes after the zero-terminated file name,
--
1.8.3.1
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2014-11-14 16:01 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-11-14 16:01 [COMMITTED] libdwelf: Check the d_buf actually exists in dwelf_elf_gnu_debuglink Mark Wielaard
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).