From c8992e89594a54edf283e4916f794475070b5114 Mon Sep 17 00:00:00 2001 From: freenancial Date: Tue, 21 Jul 2020 15:21:27 -0700 Subject: test: Fix fuzzer compilation on macOS fixes #19557 --- src/test/fuzz/util.h | 4 ++-- 1 file 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(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; -- cgit v1.2.3