diff options
Diffstat (limited to 'libdw')
-rw-r--r-- | libdw/ChangeLog | 5 | ||||
-rw-r--r-- | libdw/fde.c | 7 |
2 files changed, 12 insertions, 0 deletions
diff --git a/libdw/ChangeLog b/libdw/ChangeLog index b176ade6..738e2236 100644 --- a/libdw/ChangeLog +++ b/libdw/ChangeLog @@ -1,5 +1,10 @@ 2015-12-01 Mark Wielaard <mjw@redhat.com> + * fde.c (intern_fde): Don't intern an fde that doesn't cover a + valid code range. + +2015-12-01 Mark Wielaard <mjw@redhat.com> + * dwarf_end.c (dwarf_end): Call cu_free on fake_loc_cu if it exists. 2015-10-14 Chih-Hung Hsieh <chh@google.com> diff --git a/libdw/fde.c b/libdw/fde.c index c8475f3e..2a59d3e1 100644 --- a/libdw/fde.c +++ b/libdw/fde.c @@ -90,6 +90,13 @@ intern_fde (Dwarf_CFI *cache, const Dwarf_FDE *entry) } fde->end += fde->start; + /* Make sure the fde actually covers a real code range. */ + if (fde->start >= fde->end) + { + free (fde); + return (void *) -1; + } + fde->cie = cie; if (cie->sized_augmentation_data) |