diff options
| author | Mark Wielaard <[email protected]> | 2018-01-25 13:24:19 +0100 |
|---|---|---|
| committer | Mark Wielaard <[email protected]> | 2018-01-25 13:58:26 +0100 |
| commit | e98f032d293a8ea8ea2b25949d7f452603e644d9 (patch) | |
| tree | 4d6d4f1f405678affff86b4940d88b9d43e3b24c /tests/funcretval_test.c | |
| parent | 1e2c886bb2e1e48dfc592f356ecad7da0a032f0a (diff) | |
readelf: Fix crash on reading loc data or range data with bad/no CUs.
In print_debug_ranges_section and print_debug_loc_section we try to
get the associated CU through skip_listptr_hole for the first data data.
If no CU at all can be found (because the .debug_info section was bogus)
this would keep the Dwarf_CU uninitialized causing a crash later on
when it was compared to the last_cu and used because it was unequal.
Fix this by explicitly initializing cu to last_cu (which is NULL on
first use).
Signed-off-by: Mark Wielaard <[email protected]>
Diffstat (limited to 'tests/funcretval_test.c')
0 files changed, 0 insertions, 0 deletions
