From fda8f51d6e58a46971f12be7649dce8c4e2a14a6 Mon Sep 17 00:00:00 2001 From: Robin Watts Date: Mon, 3 Jul 2017 19:27:21 +0100 Subject: Avoid leaking an fz_stream for every unknown crypt handler. --- source/pdf/pdf-crypt.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/source/pdf/pdf-crypt.c b/source/pdf/pdf-crypt.c index 9baefae5..e7f5f7a9 100644 --- a/source/pdf/pdf-crypt.c +++ b/source/pdf/pdf-crypt.c @@ -1011,7 +1011,7 @@ pdf_open_crypt_imp(fz_context *ctx, fz_stream *chain, pdf_crypt *crypt, pdf_cryp if (stmf->method == PDF_CRYPT_AESV2 || stmf->method == PDF_CRYPT_AESV3) return fz_open_aesd(ctx, chain, key, len); - return fz_open_copy(ctx, chain); + return chain; } fz_stream * -- cgit v1.2.3