From 8ba393e70d984d902b15b9e6876f4d0d38ae4be8 Mon Sep 17 00:00:00 2001 From: Mark Adler Date: Sat, 21 Jan 2017 12:13:25 -0800 Subject: [PATCH] Fix bug when window full in deflate_stored(). --- deflate.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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;