Skip to content
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
comment
  • Loading branch information
tlively committed Apr 24, 2024
commit 748dd2c78f2d023b4ae764bfcefb7944ead61ef3
1 change: 1 addition & 0 deletions src/support/file.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -71,6 +71,7 @@ T wasm::read_file(const std::string& filename, Flags::BinaryOption binary) {
<< "': Input file too large: " << insize
<< " bytes. Try rebuilding in 64-bit mode.";
}
// Zero-initialize the string or vector with the expected size.
T input(size_t(insize), '\0');
if (size_t(insize) == 0) {
return input;
Expand Down