Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fixed bad_alloc exception in fuzzer test #2778

Merged
merged 1 commit into from
Jul 31, 2017
Merged
Changes from all commits
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
fixed bad_alloc exception in fuzzer test
rrrlasse committed Jul 31, 2017
commit 83902e6aa047dbc3f47c52133992086f241773fa
2 changes: 1 addition & 1 deletion test/fuzz_group.cpp
Original file line number Diff line number Diff line change
@@ -209,7 +209,7 @@ Mixed construct_mixed(State& s, util::Optional<std::ostream&> log, std::string&
}
case 5: {
size_t rand_char = get_next(s);
size_t blob_size = get_int64(s) % ArrayBlob::max_binary_size;
size_t blob_size = static_cast<uint64_t>(get_int64(s)) % ArrayBlob::max_binary_size;
buffer = std::string(blob_size, static_cast<unsigned char>(rand_char));
if (log) {
*log << "std::string blob(" << blob_size << ", static_cast<unsigned char>(" << rand_char << "));\n"