diff options
author | Mark Wielaard <[email protected]> | 2020-06-11 23:16:21 +0200 |
---|---|---|
committer | Mark Wielaard <[email protected]> | 2020-06-11 23:16:21 +0200 |
commit | 50a6eeef7d87623faa65126dc3d16c2a8e613aea (patch) | |
tree | 19a35135efaac56c49a30316c6572c7b4d6ec4aa /libelf/elf_strptr.c | |
parent | 49f13584d60322578c19b6118393ab04236ca7bf (diff) | |
parent | a2bc0214a5615551d89cef8d160bdbaafd5f1a83 (diff) |
Merge tag 'elfutils-0.180' into mjw/RH-DTSdts-0.180
elfutils 0.180 release
Diffstat (limited to 'libelf/elf_strptr.c')
-rw-r--r-- | libelf/elf_strptr.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/libelf/elf_strptr.c b/libelf/elf_strptr.c index e72a3a36..c7271707 100644 --- a/libelf/elf_strptr.c +++ b/libelf/elf_strptr.c @@ -145,7 +145,7 @@ elf_strptr (Elf *elf, size_t idx, size_t offset) else { Elf64_Shdr *shdr = strscn->shdr.e64 ?: __elf64_getshdr_rdlock (strscn); - if (unlikely (shdr->sh_type != SHT_STRTAB)) + if (unlikely (shdr == NULL || shdr->sh_type != SHT_STRTAB)) { /* This is no string section. */ __libelf_seterrno (ELF_E_INVALID_SECTION); |