Skip to content

Commit 817ac63

Browse files
alexcrichtondscho
authored andcommitted
Fix a use of uninitialized bytes in pecoff.c
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
1 parent e5a1699 commit 817ac63

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
@@ -595,7 +595,7 @@ coff_add (struct backtrace_state *state, int descriptor,
595595
const b_coff_section_header *sects;
596596
struct backtrace_view str_view;
597597
int str_view_valid;
598-
size_t str_size;
598+
uint32_t str_size;
599599
off_t str_off;
600600
struct backtrace_view syms_view = {0};
601601
off_t syms_off;

0 commit comments

Comments
 (0)