2010-09-17 20:47:03 +02:00
|
|
|
From: Stephan Kulow <coolo@novell.com>
|
|
|
|
|
|
|
|
Avoid crash if the header is 0
|
|
|
|
|
2014-01-29 20:02:33 +01:00
|
|
|
---
|
|
|
|
libdw/dwarf_getcfi_elf.c | 2 +-
|
|
|
|
1 file changed, 1 insertion(+), 1 deletion(-)
|
|
|
|
|
|
|
|
--- a/libdw/dwarf_getcfi_elf.c
|
|
|
|
+++ b/libdw/dwarf_getcfi_elf.c
|
2012-11-29 13:05:16 +01:00
|
|
|
@@ -76,7 +76,7 @@ parse_eh_frame_hdr (const uint8_t *hdr,
|
2010-09-17 20:47:03 +02:00
|
|
|
{
|
|
|
|
const uint8_t *h = hdr;
|
|
|
|
|
|
|
|
- if (*h++ != 1) /* version */
|
|
|
|
+ if (!h || *h++ != 1) /* version */
|
|
|
|
return (void *) -1l;
|
|
|
|
|
|
|
|
uint8_t eh_frame_ptr_encoding = *h++;
|