Fix two errors introduced in #1110 and #1112. Since
#1110, encountering the invalid indirect reference #1110
-2147483648 n R produces an integer underflow which, if
undetected, immediately trigger a logic error. Since
#1112, object -1 0 R may be incorrectly identified as
an earlier generation of itself and deleted,
invalidating a live iterator.
It is possible to reproduce the failure with this file following the
instructions with oss-fuzz, though it does not cause a failure in CI.
The failure was introduced in
18c1ffe0df.
Files are copied into the build area rather than left in the source
tree, and the test suite looks for them there. Also remove special
case around counting files in the qpdf corpus.
Since the introduction of fuzz testing, there has never been a problem
found because of a failure of a file in the fuzzer seed corpus. As the
fuzzer has found problems, they have been added to the test suite, and
that should be adequate to exercise the fuzzers in the tesing
environment as well as providing adequate regression testing.
Removing these original files shaves many minutes off the builds in CI.
When making resources indirect in from_dr, the code was using the
wrong owning QPDF, forgetting that from_dr had already been copied
using CopyForeignObject.
There isn't really an issue with these files causing a real problem,
but malware and virus checkers trip on them, and the value to leaving
them in the test suite is too low to be worth the hassle.
It's detected in QPDFWriter instead of at parse time because I can't
figure out how to construct a test case in a reasonable time. This
commit moves the fuzz file into the regular test suite for a QTC
coverage case.