summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorMark Wielaard <[email protected]>2014-12-08 10:11:43 +0100
committerMark Wielaard <[email protected]>2014-12-12 13:04:19 +0100
commit990fbe5653b667083667fc6c870dac4e3cf13ee6 (patch)
tree2fe943f6dee953b912d415a8b5e78c43980c9f08 /src
parent8d200b5b728b7ee6150796e4baa07b54e1ac8cd2 (diff)
readelf: Report invalid data if action table doesn't follow call site table.
Don't assert. Signed-off-by: Mark Wielaard <[email protected]>
Diffstat (limited to 'src')
-rw-r--r--src/ChangeLog5
-rw-r--r--src/readelf.c3
2 files changed, 7 insertions, 1 deletions
diff --git a/src/ChangeLog b/src/ChangeLog
index 12b7e7f4..ae3a3d4d 100644
--- a/src/ChangeLog
+++ b/src/ChangeLog
@@ -1,3 +1,8 @@
+2014-12-08 Mark Wielaard <[email protected]>
+
+ * readelf.c (print_debug_exception_table): Report invalid data if
+ action table doesn't immediately follow call site table.
+
2014-12-10 Josh Stone <[email protected]>
* addr2line.c (get_diename): New, get linkage_name or name.
diff --git a/src/readelf.c b/src/readelf.c
index fa9ede1d..1db54c6d 100644
--- a/src/readelf.c
+++ b/src/readelf.c
@@ -7748,7 +7748,8 @@ print_debug_exception_table (Dwfl_Module *dwflmod __attribute__ ((unused)),
" Action: %u\n"),
u++, call_site_start, call_site_length, landing_pad, action);
}
- assert (readp == action_table);
+ if (readp != action_table)
+ goto invalid_data;
unsigned int max_ar_filter = 0;
if (max_action > 0)