From 429ff3e81d7dd8c70eddcd7822826b8c45ddf146 Mon Sep 17 00:00:00 2001 From: Kelvin Lee Date: Fri, 13 Nov 2020 08:03:09 +1100 Subject: [PATCH] AVRO-2955: Fix z_stream buffer pointer assignment. --- lang/c/src/codec.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lang/c/src/codec.c b/lang/c/src/codec.c index 613a914373a..b29f6b7e379 100644 --- a/lang/c/src/codec.c +++ b/lang/c/src/codec.c @@ -340,7 +340,7 @@ static int decode_deflate(avro_codec_t c, void * data, int64_t len) if (err == Z_BUF_ERROR) { c->block_data = avro_realloc(c->block_data, c->block_size, c->block_size * 2); - s->next_out = c->block_data + s->total_out; + s->next_out = (Bytef*) c->block_data + s->total_out; s->avail_out += c->block_size; c->block_size = c->block_size * 2; }