]> git.lizzy.rs Git - zlib.git/commitdiff
Fix bug when window full in deflate_stored().
authorMark Adler <madler@alumni.caltech.edu>
Sat, 21 Jan 2017 20:13:25 +0000 (12:13 -0800)
committerMark Adler <madler@alumni.caltech.edu>
Thu, 16 Feb 2017 06:39:25 +0000 (22:39 -0800)
deflate.c

index d368b25b78779f633abcca1e3a3fa520434988c4..e97bd878341166e295d272a11204338a2b9233f4 100644 (file)
--- 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;