2
1
mirror of https://github.com/qpdf/qpdf.git synced 2024-10-31 19:02:30 +00:00

Store indirect nulls in QPDF_Dictionary

This commit is contained in:
m-holger 2023-08-25 12:25:06 +01:00
parent 34491c612d
commit 6574dc5c03

View File

@ -122,7 +122,9 @@ void
QPDF_Dictionary::replaceKey(std::string const& key, QPDFObjectHandle value)
{
if (value.isNull() && !value.isIndirect()) {
// The PDF spec doesn't distinguish between keys with null values and missing keys.
// The PDF spec doesn't distinguish between keys with null values and missing keys. Allow
// indirect nulls which are equivalent to a dangling reference, which is permitted by the
// spec.
removeKey(key);
} else {
// add or replace value