Defer object/value decryption to after the object is loaded (Issue #42)

This commit is contained in:
Michael R Sweet
2023-12-14 16:02:26 -05:00
parent 5d760e7315
commit 7330cc35ba
5 changed files with 233 additions and 96 deletions

View File

@ -466,6 +466,13 @@ _pdfioObjLoad(pdfio_obj_t *obj) // I - Object
PDFIO_DEBUG("_pdfioObjLoad: stream_offset=%lu.\n", (unsigned long)obj->stream_offset);
}
// Decrypt as needed...
if (obj->pdf->encryption)
{
if (!_pdfioValueDecrypt(obj->pdf, obj, &obj->value, 0))
return (false);
}
PDFIO_DEBUG("_pdfioObjLoad: ");
PDFIO_DEBUG_VALUE(&obj->value);
PDFIO_DEBUG("\n");