X-Git-Url: https://git.distorted.org.uk/~mdw/sgt/halibut/blobdiff_plain/f4944c7cf92f243fd5c48361c6012e84f71fb545..2901c406fda763902b1e77263ec273187f7dc75b:/deflate.c diff --git a/deflate.c b/deflate.c index ecae0d0..5bb3cce 100644 --- a/deflate.c +++ b/deflate.c @@ -2443,6 +2443,10 @@ int deflate_decompress_data(deflate_decompress_ctx *dctx, goto finished; nlen = dctx->bits & 0xFFFF; EATBITS(16); + if (dctx->uncomplen != (nlen ^ 0xFFFF)) { + error = DEFLATE_ERR_UNCOMP_HDR; + goto finished; + } if (dctx->uncomplen == 0) dctx->state = OUTSIDEBLK; /* block is empty */ else