diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/test/fuzz/util.h | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/test/fuzz/util.h b/src/test/fuzz/util.h index 148610c04d..9f9552edb9 100644 --- a/src/test/fuzz/util.h +++ b/src/test/fuzz/util.h @@ -332,7 +332,7 @@ public: return 0; } std::memcpy(buf, random_bytes.data(), random_bytes.size()); - if (AdditionOverflow((uint64_t)fuzzed_file->m_offset, random_bytes.size())) { + if (AdditionOverflow(fuzzed_file->m_offset, (int64_t)random_bytes.size())) { return fuzzed_file->m_fuzzed_data_provider.ConsumeBool() ? 0 : -1; } fuzzed_file->m_offset += random_bytes.size(); @@ -343,7 +343,7 @@ public: { FuzzedFileProvider* fuzzed_file = (FuzzedFileProvider*)cookie; const ssize_t n = fuzzed_file->m_fuzzed_data_provider.ConsumeIntegralInRange<ssize_t>(0, size); - if (AdditionOverflow(fuzzed_file->m_offset, n)) { + if (AdditionOverflow(fuzzed_file->m_offset, (int64_t)n)) { return fuzzed_file->m_fuzzed_data_provider.ConsumeBool() ? 0 : -1; } fuzzed_file->m_offset += n; |