forked from pool/elfutils
2fbc53df99
self accept OBS-URL: https://build.opensuse.org/request/show/47991 OBS-URL: https://build.opensuse.org/package/show/Base:System/elfutils?expand=0&rev=18
18 lines
583 B
Diff
18 lines
583 B
Diff
From: Stephan Kulow <coolo@novell.com>
|
|
|
|
Avoid crash if the header is 0
|
|
|
|
Index: elfutils-0.148/libdw/dwarf_getcfi_elf.c
|
|
===================================================================
|
|
--- elfutils-0.148.orig/libdw/dwarf_getcfi_elf.c 2010-01-12 17:57:54.000000000 +0100
|
|
+++ elfutils-0.148/libdw/dwarf_getcfi_elf.c 2010-09-13 12:51:04.299807382 +0200
|
|
@@ -97,7 +97,7 @@ parse_eh_frame_hdr (const uint8_t *hdr,
|
|
{
|
|
const uint8_t *h = hdr;
|
|
|
|
- if (*h++ != 1) /* version */
|
|
+ if (!h || *h++ != 1) /* version */
|
|
return (void *) -1l;
|
|
|
|
uint8_t eh_frame_ptr_encoding = *h++;
|