Commit 73878a80152d617800a360e31fd4d439502937de
1 parent
d16e822d
Fix `replaceKey` in `BaseDictionary`: update to use `null`/`indirect` API.
Fixes #1532.
Showing
4 changed files
with
3 additions
and
2 deletions
fuzz/CMakeLists.txt
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. | ... | ... |