From 85b65f8d61601cf0140fad9d0048de72081779da Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Gr=C3=A9gory=20Soutad=C3=A9?= Date: Thu, 3 Mar 2022 21:07:25 +0100 Subject: [PATCH] Pad ADEPT_LICENSE before trying to decode it --- src/libgourou.cpp | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/libgourou.cpp b/src/libgourou.cpp index f8d2ecd..b4f2918 100644 --- a/src/libgourou.cpp +++ b/src/libgourou.cpp @@ -1118,6 +1118,9 @@ namespace gourou uPDFParser::String* licenseObject = (uPDFParser::String*)(*ebx)["ADEPT_LICENSE"]; std::string value = licenseObject->value(); + // Pad with '=' + while ((value.size() % 4)) + value += "="; ByteArray zippedData = ByteArray::fromBase64(value); if (zippedData.size() == 0)