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: v1.2.12~58 X-Git-Url: https://git.lizzy.rs/?a=commitdiff_plain;h=8ba393e70d984d902b15b9e6876f4d0d38ae4be8;p=zlib.git Fix bug when window full in deflate_stored(). --- diff --git a/deflate.c b/deflate.c index d368b25..e97bd87 100644 --- a/deflate.c +++ b/deflate.c @@ -1775,7 +1775,7 @@ local block_state deflate_stored(s, 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;