From b41592118ef76b7a0af7c543c0cd13125049e5a1 Mon Sep 17 00:00:00 2001 From: sebpop Date: Fri, 11 Jan 2019 16:14:17 -0600 Subject: [PATCH] oss-fuzz/12299: fix build error due to change in interface for fast crc32 (#2082) --- projects/zlib/checksum_fuzzer.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/projects/zlib/checksum_fuzzer.c b/projects/zlib/checksum_fuzzer.c index b14ba6fc3..b22b8f4af 100644 --- a/projects/zlib/checksum_fuzzer.c +++ b/projects/zlib/checksum_fuzzer.c @@ -17,7 +17,7 @@ int LLVMFuzzerTestOneInput(const uint8_t *data, size_t dataLen) { /* Checksum with a buffer of size equal to the first byte in the input. */ uint32_t buffSize = data[0]; uint32_t offset = 0; - z_crc_t op[32]; + uint32_t op; /* Discard inputs larger than 1Mb. */ static size_t kMaxSize = 1024 * 1024; @@ -29,7 +29,7 @@ int LLVMFuzzerTestOneInput(const uint8_t *data, size_t dataLen) { ++buffSize; /* CRC32 */ - crc32_combine_gen(op, buffSize); + op = crc32_combine_gen(buffSize); for (offset = 0; offset + buffSize <= dataLen; offset += buffSize) { uint32_t crc3 = crc32_z(crc0, data + offset, buffSize); uint32_t crc4 = crc32_combine_op(crc1, crc3, op); @@ -45,7 +45,7 @@ int LLVMFuzzerTestOneInput(const uint8_t *data, size_t dataLen) { crc32_combine(crc1, crc1, dataLen)); /* Fast CRC32 combine. */ - crc32_combine_gen(op, dataLen); + op = crc32_combine_gen(dataLen); assert(crc32_combine_op(crc1, crc2, op) == crc32_combine_op(crc2, crc1, op)); assert(crc32_combine(crc1, crc2, dataLen) ==