diff options
author | Max Ostapenko <m.ostapenko@partner.samsung.com> | 2016-03-02 18:32:55 +0200 |
---|---|---|
committer | Maxim Ostapenko <chefmax@gcc.gnu.org> | 2016-03-02 18:32:55 +0200 |
commit | 26ac52dba5e09da10e56f31b13d2e128f702aea2 (patch) | |
tree | 0b3dedbbdec90aad69b442d95643d33d4d9f7ad2 /libbacktrace/elf.c | |
parent | 171f7de552f8ece0addc4955915fc4971a8c98a9 (diff) |
elf.c (backtrace_initialize): Properly initialize elf_fileline_fn to avoid possible crash.
libbacktrace/
2016-03-02 Maxim Ostapenko <m.ostapenko@partner.samsung.com>
* elf.c (backtrace_initialize): Properly initialize elf_fileline_fn to
avoid possible crash.
(elf_add): Don't set *fileline_fn to elf_nodebug value in case of
missing debug info anymore.
From-SVN: r233911
Diffstat (limited to 'libbacktrace/elf.c')
-rw-r--r-- | libbacktrace/elf.c | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/libbacktrace/elf.c b/libbacktrace/elf.c index 05cc5c04734..f85ac65d99f 100644 --- a/libbacktrace/elf.c +++ b/libbacktrace/elf.c @@ -791,7 +791,6 @@ elf_add (struct backtrace_state *state, int descriptor, uintptr_t base_address, { if (!backtrace_close (descriptor, error_callback, data)) goto fail; - *fileline_fn = elf_nodebug; return 1; } @@ -925,7 +924,7 @@ backtrace_initialize (struct backtrace_state *state, int descriptor, int ret; int found_sym; int found_dwarf; - fileline elf_fileline_fn; + fileline elf_fileline_fn = elf_nodebug; struct phdr_data pd; ret = elf_add (state, descriptor, 0, error_callback, data, &elf_fileline_fn, |