Skip to content

Commit

Permalink
Fix a use of undefined memory in pecoff.c
Browse files Browse the repository at this point in the history
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
  • Loading branch information
alexcrichton authored and dscho committed Apr 8, 2024
1 parent 7ead8c1 commit 07eaec4
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion pecoff.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit 07eaec4

Please sign in to comment.