]> git.ipfire.org Git - thirdparty/zlib-ng.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)
committerHans Kristian Rosbach <hk-github@circlestorm.org>
Tue, 15 Jan 2019 10:00:27 +0000 (11:00 +0100)
deflate.c

index 30c6d9847e695af1d138c6e19a01eb9104e60566..64d870f0ddb2035d4ed6c0b7758fbaa461e0163a 100644 (file)
--- 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;