Skip to content

Commit e5a1699

Browse files
alexcrichtondscho
authored andcommitted
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 8602fda commit e5a1699

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

pecoff.c

+1-1
Original file line numberDiff line numberDiff line change
@@ -597,7 +597,7 @@ coff_add (struct backtrace_state *state, int descriptor,
597597
int str_view_valid;
598598
size_t str_size;
599599
off_t str_off;
600-
struct backtrace_view syms_view;
600+
struct backtrace_view syms_view = {0};
601601
off_t syms_off;
602602
size_t syms_size;
603603
int syms_view_valid;

0 commit comments

Comments
 (0)