mirror of
https://github.com/openharmony/third_party_elfutils.git
synced 2026-07-01 06:41:51 -04:00
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:
@@ -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.
|
||||
|
||||
@@ -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,
|
||||
|
||||
Reference in New Issue
Block a user