Skip to content

Commit

Permalink
Fix a use of uninitialized bytes in pecoff.c
Browse files Browse the repository at this point in the history
This updates the local declaration of `str_size` to always be 4 bytes instead of
platform-dependent as its initialization later on only fills in 4 bytes instead
of all the bytes of `size_t`.

Originally reported as rust-lang/rust#28447 this was fixed in
rust-lang/rust#30908
  • Loading branch information
alexcrichton authored and dscho committed Jul 18, 2022
1 parent e5a1699 commit 817ac63
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 @@ -595,7 +595,7 @@ coff_add (struct backtrace_state *state, int descriptor,
const b_coff_section_header *sects;
struct backtrace_view str_view;
int str_view_valid;
size_t str_size;
uint32_t str_size;
off_t str_off;
struct backtrace_view syms_view = {0};
off_t syms_off;
Expand Down

0 comments on commit 817ac63

Please sign in to comment.