diff --git a/src/test/fuzz/util.h b/src/test/fuzz/util.h index 30a3580e3913cf..b2bf75b3790ddd 100644 --- a/src/test/fuzz/util.h +++ b/src/test/fuzz/util.h @@ -398,7 +398,7 @@ class FuzzedFileProvider return 0; } std::memcpy(buf, random_bytes.data(), random_bytes.size()); - if (AdditionOverflow(static_cast(fuzzed_file->m_offset), random_bytes.size())) { + if (AdditionOverflow(fuzzed_file->m_offset, static_cast(random_bytes.size()))) { return fuzzed_file->m_fuzzed_data_provider.ConsumeBool() ? 0 : -1; } fuzzed_file->m_offset += random_bytes.size(); @@ -410,7 +410,7 @@ class FuzzedFileProvider FuzzedFileProvider* fuzzed_file = (FuzzedFileProvider*)cookie; SetFuzzedErrNo(fuzzed_file->m_fuzzed_data_provider); const ssize_t n = fuzzed_file->m_fuzzed_data_provider.ConsumeIntegralInRange(0, size); - if (AdditionOverflow(static_cast(fuzzed_file->m_offset), n)) { + if (AdditionOverflow(fuzzed_file->m_offset, static_cast(n))) { return fuzzed_file->m_fuzzed_data_provider.ConsumeBool() ? 0 : -1; } fuzzed_file->m_offset += n;