diff options
author | Mark Wielaard <mjw@redhat.com> | 2014-11-14 16:58:36 +0100 |
---|---|---|
committer | Mark Wielaard <mjw@redhat.com> | 2014-11-14 16:58:36 +0100 |
commit | 2f8e4d338323f225a117b34f84155917a7e49271 (patch) | |
tree | 31bf2cd55783ac959ee2cf85604c92c5778d5bf0 /libdwelf | |
parent | df5ad1681cfc5c27df853299c5d8bfea5448bcca (diff) | |
download | android_external_elfutils-2f8e4d338323f225a117b34f84155917a7e49271.tar.gz android_external_elfutils-2f8e4d338323f225a117b34f84155917a7e49271.tar.bz2 android_external_elfutils-2f8e4d338323f225a117b34f84155917a7e49271.zip |
libdwelf: Check the d_buf actually exists in dwelf_elf_gnu_debuglink.
Signed-off-by: Mark Wielaard <mjw@redhat.com>
Diffstat (limited to 'libdwelf')
-rw-r--r-- | libdwelf/ChangeLog | 5 | ||||
-rw-r--r-- | libdwelf/dwelf_elf_gnu_debuglink.c | 2 |
2 files changed, 6 insertions, 1 deletions
diff --git a/libdwelf/ChangeLog b/libdwelf/ChangeLog index 9f95ea81..342cb9cf 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 7b5fc93c..6e22cf67 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, |