libdwelf: Check the d_buf actually exists in dwelf_elf_gnu_debuglink.

Signed-off-by: Mark Wielaard <mjw@redhat.com>
This commit is contained in:
Mark Wielaard
2014-11-14 16:58:36 +01:00
parent df5ad1681c
commit 2f8e4d3383
2 changed files with 6 additions and 1 deletions
+5
View File
@@ -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.
+1 -1
View File
@@ -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,