em_inflate.c

Fast, small, in-memory inflate (zlib, deflate and gzip decompression)
git clone git://git.finwo.net/lib/em_inflate.c
Log | Files | Refs | README | LICENSE

commit 00d434f95de721c7d6b430afe6108f527d44cbd0
parent 307a5bff31a17aa713a958f1ee2e3fa681e3be26
Author: Emmanuel Marty <emmanuel@fgl.com>
Date:   Thu, 30 May 2019 19:04:12 +0200

Make sure we don't overrun
Diffstat:
Mlib/em_inflate.c | 2+-
1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/lib/em_inflate.c b/lib/em_inflate.c @@ -599,7 +599,7 @@ static size_t em_inflate_decompress_block(em_lsb_bitreader_t *pBitReader, int nD unsigned char *pCurOutData = pOutData + nOutDataOffset; const unsigned char *pOutDataEnd = pCurOutData + nBlockMaxSize; - const unsigned char *pOutDataFastEnd = pOutDataEnd - (16 - MIN_MATCH_SIZE); + const unsigned char *pOutDataFastEnd = pOutDataEnd - 15; while (1) { em_lsb_bitreader_refill_32(pBitReader);