Skip to content

Commit af6857c

Browse files
committed
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
1 parent 14d377e commit af6857c

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

pecoff.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -604,7 +604,7 @@ coff_add (struct backtrace_state *state, int descriptor,
604604
int str_view_valid;
605605
size_t str_size;
606606
off_t str_off;
607-
struct backtrace_view syms_view;
607+
struct backtrace_view syms_view = {0};
608608
off_t syms_off;
609609
size_t syms_size;
610610
int syms_view_valid;

0 commit comments

Comments
 (0)