Skip to content

Commit

Permalink
Fix use-of-uninitialized-value due to getData128()
Browse files Browse the repository at this point in the history
When temporary buffer is used in getData128(), then it may return
uninitialized data.

Signed-off-by: Azat Khuzhin <[email protected]>
  • Loading branch information
azat committed May 10, 2023
1 parent b4bba94 commit be47043
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/rose/program_runtime.c
Original file line number Diff line number Diff line change
Expand Up @@ -959,7 +959,7 @@ m128 getData128(const struct core_info *ci, s64a offset, u32 *valid_data_mask) {
*valid_data_mask = 0xffff;
return loadu128(ci->buf + offset);
}
ALIGN_DIRECTIVE u8 data[sizeof(m128)];
ALIGN_DIRECTIVE u8 data[sizeof(m128)] = { 0 };
*valid_data_mask = getBufferDataComplex(ci, offset, data, 16);
return *(m128 *)data;
}
Expand Down

0 comments on commit be47043

Please sign in to comment.