From: Donald Sharp Date: Sat, 30 Jan 2021 21:19:08 +0000 (-0500) Subject: lib: Prevent unininted usage of data X-Git-Tag: base_8.0~440^2 X-Git-Url: https://git.puffer.fish/?a=commitdiff_plain;h=63e040391d8ae958a2fe04f2b836fecfdb782431;p=mirror%2Ffrr.git lib: Prevent unininted usage of data Valgrind reports that some data being used in the stack unwind of a crash is being used uninitailized. Signed-off-by: Donald Sharp --- diff --git a/lib/log.c b/lib/log.c index 03ed23a04b..f7275589c2 100644 --- a/lib/log.c +++ b/lib/log.c @@ -179,6 +179,9 @@ void zlog_backtrace_sigsafe(int priority, void *program_counter) unw_word_t ip, off, sp; Dl_info dlinfo; + memset(&uc, 0, sizeof(uc)); + memset(&cursor, 0, sizeof(cursor)); + unw_getcontext(&uc); unw_init_local(&cursor, &uc); while (unw_step(&cursor) > 0) {