summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSimon Tatham <anakin@pobox.com>2012-05-03 17:40:08 +0000
committerSimon Tatham <anakin@pobox.com>2012-05-03 17:40:08 +0000
commitca37980e070dcd96d27d299bd4426858ec37ceae (patch)
tree739dc238fc821cdccc4d6616ee3b9bffbc07de50
parent66eb3850217ab01cff7e3622ea5f34f757b82138 (diff)
downloadhalibut-ca37980e070dcd96d27d299bd4426858ec37ceae.zip
halibut-ca37980e070dcd96d27d299bd4426858ec37ceae.tar.gz
halibut-ca37980e070dcd96d27d299bd4426858ec37ceae.tar.bz2
halibut-ca37980e070dcd96d27d299bd4426858ec37ceae.tar.xz
Ahem. Don't invert the length _twice_.
[originally from svn r9476]
-rw-r--r--deflate.c2
1 files changed, 1 insertions, 1 deletions
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;