diff --git a/Pdf4QtLibCore/sources/pdfsecurityhandler.cpp b/Pdf4QtLibCore/sources/pdfsecurityhandler.cpp index 6f82b7b..4af48cf 100644 --- a/Pdf4QtLibCore/sources/pdfsecurityhandler.cpp +++ b/Pdf4QtLibCore/sources/pdfsecurityhandler.cpp @@ -353,10 +353,15 @@ void PDFSecurityHandler::parseDataStandardSecurityHandler(const PDFDictionary* d { result = object.getString(); - if (result.size() != size) + if (result.size() < size) { throw PDFException(PDFTranslationContext::tr("Expected %1 characters long string in entry '%2'. Provided length is %3.").arg(size).arg(QString::fromLatin1(key)).arg(result.size())); } + + if (result.size() > size) + { + result.resize(size); + } } else { diff --git a/RELEASES.txt b/RELEASES.txt index d17e55d..2f53ea5 100644 --- a/RELEASES.txt +++ b/RELEASES.txt @@ -1,5 +1,6 @@ CURRENT: - - Issue #164: Taskbar icon not shown in linux mint. + - Issue #164: Taskbar icon not shown in linux mint. + - Issue #163: Unable to render probably valid PDF - Issue #161: Can it be possible to trust a certificate like in acrobat? - Issue #123: Alternative software rendering backend (Blend2D)