summaryrefslogtreecommitdiff
path: root/libdw/fde.c
diff options
context:
space:
mode:
Diffstat (limited to 'libdw/fde.c')
-rw-r--r--libdw/fde.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/libdw/fde.c b/libdw/fde.c
index f5f6fbe1..73d551b6 100644
--- a/libdw/fde.c
+++ b/libdw/fde.c
@@ -104,9 +104,12 @@ intern_fde (Dwarf_CFI *cache, const Dwarf_FDE *entry)
/* The CIE augmentation says the FDE has a DW_FORM_block
before its actual instruction stream. */
Dwarf_Word len;
+ if (fde->instructions >= fde->instructions_end)
+ goto invalid;
get_uleb128 (len, fde->instructions, fde->instructions_end);
if ((Dwarf_Word) (fde->instructions_end - fde->instructions) < len)
{
+ invalid:
free (fde);
__libdw_seterrno (DWARF_E_INVALID_DWARF);
return NULL;