From ca37980e070dcd96d27d299bd4426858ec37ceae Mon Sep 17 00:00:00 2001 From: Simon Tatham Date: Thu, 3 May 2012 17:40:08 +0000 Subject: Ahem. Don't invert the length _twice_. [originally from svn r9476] --- deflate.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/deflate.c b/deflate.c index a04f86d..5bb3cce 100644 --- a/deflate.c +++ b/deflate.c @@ -2441,7 +2441,7 @@ int deflate_decompress_data(deflate_decompress_ctx *dctx, */ if (dctx->nbits < 16) goto finished; - nlen = 0xFFFF & ~dctx->bits; + nlen = dctx->bits & 0xFFFF; EATBITS(16); if (dctx->uncomplen != (nlen ^ 0xFFFF)) { error = DEFLATE_ERR_UNCOMP_HDR; -- cgit v1.1