projects
/
platform
/
upstream
/
elfutils.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
f0cd631
)
elfutils-0.148-dont-crash.diff
author
Stephan Kulow
<coolo@novell.com>
Thu, 8 Nov 2012 02:10:56 +0000
(18:10 -0800)
committer
Chanho Park
<chanho61.park@samsung.com>
Wed, 26 Nov 2014 14:33:39 +0000
(23:33 +0900)
Avoid crash if the header is 0
libdw/dwarf_getcfi_elf.c
patch
|
blob
|
history
diff --git
a/libdw/dwarf_getcfi_elf.c
b/libdw/dwarf_getcfi_elf.c
index
a423ef3
..
2f1284d
100644
(file)
--- a/
libdw/dwarf_getcfi_elf.c
+++ b/
libdw/dwarf_getcfi_elf.c
@@
-76,7
+76,7
@@
parse_eh_frame_hdr (const uint8_t *hdr, size_t hdr_size, GElf_Addr hdr_vaddr,
{
const uint8_t *h = hdr;
- if (
*h++ != 1)
/* version */
+ if (
!h || *h++ != 1)
/* version */
return (void *) -1l;
uint8_t eh_frame_ptr_encoding = *h++;