ofz: pdf, check record againsts max allowed size
Signed-off-by: Caolán McNamara <caolan.mcnamara@collabora.com> Change-Id: I51a31c1e09d2b5d5a413c5345c40998e032f09d6 Reviewed-on: https://gerrit.collaboraoffice.com/c/online/+/6117 Tested-by: Jenkins CPCI <releng@collaboraoffice.com> Reviewed-by: Noel Grandin <noel.grandin@collabora.com> (cherry picked from commit e230b10b7cd2d5d8623cdba0877ec68f67003690) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/207659 Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org> Tested-by: Jenkins
This commit is contained in:
committed by
Xisco Fauli
parent
a32a60c515
commit
21124741e0
@@ -1339,7 +1339,15 @@ PDFFileImplData* PDFFile::impl_getData() const
|
||||
{
|
||||
PDFNumber* pNum = dynamic_cast<PDFNumber*>(len->second);
|
||||
if( pNum )
|
||||
m_pData->m_nKeyLength = static_cast<sal_uInt32>(pNum->m_fValue) / 8;
|
||||
{
|
||||
sal_uInt32 nKeyLength = static_cast<sal_uInt32>(pNum->m_fValue) / 8;
|
||||
if (nKeyLength > ENCRYPTION_KEY_LEN)
|
||||
{
|
||||
SAL_WARN("sdext.pdfimport.pdfparse", "entry has length " << nKeyLength << " which is greater than " << ENCRYPTION_KEY_LEN);
|
||||
nKeyLength = ENCRYPTION_KEY_LEN;
|
||||
}
|
||||
m_pData->m_nKeyLength = nKeyLength;
|
||||
}
|
||||
}
|
||||
PDFName* pFilter = dynamic_cast<PDFName*>(filter->second);
|
||||
if( pFilter && pFilter->getFilteredName() == "Standard" )
|
||||
|
||||
Reference in New Issue
Block a user