Skip to content
Open
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
5 changes: 5 additions & 0 deletions src/state_example/mocks.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,11 @@ extern "C" {

int driver_get_current_time() {
int cifuzz_var_0 = GetFDP()->ConsumeIntegral<int>();
// FIX: Validate the consumed input to ensure it is within expected bounds
if (cifuzz_var_0 < 0 || cifuzz_var_0 > MAX_EXPECTED_VALUE) {
// Handle invalid input appropriately
throw std::invalid_argument("Invalid input value");
}
return cifuzz_var_0;
}

Expand Down