From: Mika Lindqvist Date: Mon, 14 Sep 2020 19:13:09 +0000 (+0300) Subject: Add missing z_const to fuzzers. X-Git-Tag: 1.9.9-b1~28 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=6539b769e677bc1e6f4954d4457aba0cd138468b;p=thirdparty%2Fzlib-ng.git Add missing z_const to fuzzers. --- diff --git a/test/fuzz/example_dict_fuzzer.c b/test/fuzz/example_dict_fuzzer.c index 3245c2b4..027c9a80 100644 --- a/test/fuzz/example_dict_fuzzer.c +++ b/test/fuzz/example_dict_fuzzer.c @@ -79,7 +79,7 @@ void test_dict_deflate(unsigned char **compr, size_t *comprLen) { c_stream.next_out = *compr; c_stream.avail_out = (unsigned int)(*comprLen); - c_stream.next_in = data; + c_stream.next_in = (z_const unsigned char *)data; c_stream.avail_in = (uint32_t)dataLen; err = PREFIX(deflate)(&c_stream, Z_FINISH); diff --git a/test/fuzz/example_flush_fuzzer.c b/test/fuzz/example_flush_fuzzer.c index 9ed42b78..81ec7e36 100644 --- a/test/fuzz/example_flush_fuzzer.c +++ b/test/fuzz/example_flush_fuzzer.c @@ -40,7 +40,7 @@ void test_flush(unsigned char *compr, z_size_t *comprLen) { err = PREFIX(deflateInit)(&c_stream, Z_DEFAULT_COMPRESSION); CHECK_ERR(err, "deflateInit"); - c_stream.next_in = (const unsigned char *)data; + c_stream.next_in = (z_const unsigned char *)data; c_stream.next_out = compr; c_stream.avail_in = 3; c_stream.avail_out = (unsigned int)*comprLen; diff --git a/test/fuzz/example_small_fuzzer.c b/test/fuzz/example_small_fuzzer.c index df8426c8..d02a812d 100644 --- a/test/fuzz/example_small_fuzzer.c +++ b/test/fuzz/example_small_fuzzer.c @@ -40,7 +40,7 @@ void test_deflate(unsigned char *compr, size_t comprLen) { err = PREFIX(deflateInit)(&c_stream, Z_DEFAULT_COMPRESSION); CHECK_ERR(err, "deflateInit"); - c_stream.next_in = (const unsigned char *)data; + c_stream.next_in = (z_const unsigned char *)data; c_stream.next_out = compr; while (c_stream.total_in != len && c_stream.total_out < comprLen) {