poppler/SecurityHandler.cc | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-)
New commits: commit ed802a62ef42e7e19d632278c2ccb405c9db1a24 Author: Albert Astals Cid <[email protected]> Date: Tue May 25 11:41:27 2021 +0200 Be a bit more verbose when we think Invalid encryption key length is wrong diff --git a/poppler/SecurityHandler.cc b/poppler/SecurityHandler.cc index f6863839..3cc95ad1 100644 --- a/poppler/SecurityHandler.cc +++ b/poppler/SecurityHandler.cc @@ -243,7 +243,10 @@ StandardSecurityHandler::StandardSecurityHandler(PDFDoc *docA, Object *encryptDi error(errUnimplemented, -1, "Unsupported version/revision ({0:d}/{1:d}) of Standard security handler", encVersion, encRevision); } } else { - error(errSyntaxError, -1, "Invalid encryption key length"); + error(errSyntaxError, -1, + "Invalid encryption key length. version: {0:d} - revision: {1:d} - ownerKeyLength: {2:d} - userKeyLength: {3:d} - ownerEncIsString: {4:d} - ownerEncLength: {5:d} - userEncIsString: {6:d} - userEncLength: {7:d}", + encVersion, encRevision, ownerKeyObj.getString()->getLength(), userKeyObj.getString()->getLength(), ownerEncObj.isString(), ownerEncObj.isString() ? ownerEncObj.getString()->getLength() : -1, userEncObj.isString(), + userEncObj.isString() ? userEncObj.getString()->getLength() : -1); } } else { error(errSyntaxError, -1, "Weird encryption info"); _______________________________________________ poppler mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/poppler
