From: Mark Adler Date: Sat, 21 Jan 2017 20:13:25 +0000 (-0800) Subject: Fix bug when window full in deflate_stored(). X-Git-Tag: 1.9.9-b1~565 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=476be2432db3c88a7a2345fba32ee31e58903011;p=thirdparty%2Fzlib-ng.git Fix bug when window full in deflate_stored(). --- diff --git a/deflate.c b/deflate.c index 30c6d984..64d870f0 100644 --- a/deflate.c +++ b/deflate.c @@ -1478,7 +1478,7 @@ static block_state deflate_stored(deflate_state *s, int flush) { return block_done; /* Fill the window with any remaining input. */ - have = s->window_size - s->strstart - 1; + have = s->window_size - s->strstart; if (s->strm->avail_in > have && s->block_start >= (long)s->w_size) { /* Slide the window down. */ s->block_start -= s->w_size;