Skip to content
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
4 changes: 4 additions & 0 deletions libc/fuzzing/stdlib/strtointeger_differential_fuzz.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,10 @@
// greater than 50% chance for each character to end the string, making the odds
// of getting long numbers very low.
extern "C" int LLVMFuzzerTestOneInput(const uint8_t *data, size_t size) {
if (size < 2) // Needs at least one byte for the base and one byte for the
// string.
return 0;

uint8_t *container = new uint8_t[size + 1];
if (!container)
__builtin_trap();
Expand Down
Loading