Skip to content

Commit

Permalink
oss-fuzz/12299: fix build error due to change in interface for fast c…
Browse files Browse the repository at this point in the history
…rc32 (#2082)
  • Loading branch information
sebpop authored and jonathanmetzman committed Jan 11, 2019
1 parent d878422 commit b415921
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions projects/zlib/checksum_fuzzer.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand All @@ -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);
Expand All @@ -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) ==
Expand Down

0 comments on commit b415921

Please sign in to comment.