Skip to content

Commit

Permalink
Issue #163: Unable to render probably valid PDF
Browse files Browse the repository at this point in the history
  • Loading branch information
JakubMelka committed Feb 27, 2024
1 parent d6f334c commit 344c341
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 2 deletions.
7 changes: 6 additions & 1 deletion Pdf4QtLibCore/sources/pdfsecurityhandler.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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
{
Expand Down
3 changes: 2 additions & 1 deletion RELEASES.txt
Original file line number Diff line number Diff line change
@@ -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)

Expand Down

0 comments on commit 344c341

Please sign in to comment.