From 07eaec450c3f9dff035b08112cfb8b0e90474143 Mon Sep 17 00:00:00 2001 From: Alex Crichton Date: Mon, 24 Jul 2017 21:55:28 -0700 Subject: [PATCH] Fix a use of undefined memory in pecoff.c In rust-lang/rust#39468 it was discovered that this could cause a crash in libbacktrace due to freeing uninitialized memory, and this specific instance was fixed in rust-lang/rust#39509 --- pecoff.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pecoff.c b/pecoff.c index e3b9519..d700cb7 100644 --- a/pecoff.c +++ b/pecoff.c @@ -609,7 +609,7 @@ coff_add (struct backtrace_state *state, int descriptor, int str_view_valid; size_t str_size; off_t str_off; - struct backtrace_view syms_view; + struct backtrace_view syms_view = {0}; off_t syms_off; size_t syms_size; int syms_view_valid;