X-Git-Url: https://mattmccutchen.net/rsync/rsync.git/blobdiff_plain/9ec5422c37fb38725523c8617df403954beb61dc..06b91d8eb97dd7ba1fa8af3f58e5aee28d831b3f:/zlib/infcodes.c diff --git a/zlib/infcodes.c b/zlib/infcodes.c index 1d3baa92..d4e5ee9a 100644 --- a/zlib/infcodes.c +++ b/zlib/infcodes.c @@ -221,6 +221,13 @@ int r; c->mode = START; break; case WASH: /* o: got eob, possibly more output */ + if (k > 7) /* return unused byte, if any */ + { + Assert(k < 16, "inflate_codes grabbed too many bytes") + k -= 8; + n++; + p--; /* can always return one */ + } FLUSH if (s->read != s->write) LEAVE