Commit 73878a80152d617800a360e31fd4d439502937de

Authored by m-holger
1 parent d16e822d

Fix `replaceKey` in `BaseDictionary`: update to use `null`/`indirect` API.

Fixes #1532.
fuzz/CMakeLists.txt
... ... @@ -163,6 +163,7 @@ set(CORPUS_OTHER
163 163 440747125.fuzz
164 164 4720043549327360.fuzz
165 165 5109284021272576.fuzz
  166 + 5828408539152384.fuzz
166 167 6489005569146880.fuzz
167 168 )
168 169  
... ...
fuzz/qpdf_extra/5828408539152384.fuzz 0 → 100644
No preview for this file type
fuzz/qtest/fuzz.test
... ... @@ -11,7 +11,7 @@ my $td = new TestDriver('fuzz');
11 11  
12 12 my $qpdf_corpus = $ENV{'QPDF_FUZZ_CORPUS'} || die "must set QPDF_FUZZ_CORPUS";
13 13  
14   -my $n_qpdf_files = 101; # increment when adding new files
  14 +my $n_qpdf_files = 102; # increment when adding new files
15 15  
16 16 my @fuzzers = (
17 17 ['ascii85' => 1],
... ...
libqpdf/QPDF_Dictionary.cc
... ... @@ -67,7 +67,7 @@ void
67 67 BaseDictionary::replaceKey(std::string const& key, QPDFObjectHandle value)
68 68 {
69 69 auto d = dict();
70   - if (value.isNull() && !value.isIndirect()) {
  70 + if (value.null() && !value.indirect()) {
71 71 // The PDF spec doesn't distinguish between keys with null values and missing keys.
72 72 // Allow indirect nulls which are equivalent to a dangling reference, which is
73 73 // permitted by the spec.
... ...