aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJay Berkenbilt <ejb@ql.org>2020-10-31 14:02:30 +0100
committerJay Berkenbilt <ejb@ql.org>2020-10-31 14:02:30 +0100
commitf1ae55a430b194aafc0afa37d5752b7d04c0f461 (patch)
tree73f73ea839a4a00a90594dc05a1e36343a0673fd
parentc5602e931a2fe476f4bd35cf805609a5c73a968b (diff)
downloadqpdf-f1ae55a430b194aafc0afa37d5752b7d04c0f461.tar.zst
Better indirect filter test case
The test suite now contains test cases that fail with both 10.0.1 and 10.0.2 and reproduce the internal error from #449.
-rw-r--r--qpdf/qtest/qpdf.test15
-rw-r--r--qpdf/qtest/qpdf/indirect-filter.pdfbin5188 -> 5404 bytes
-rw-r--r--qpdf/qtest/qpdf/issue-449.pdfbin0 -> 1202 bytes
3 files changed, 13 insertions, 2 deletions
diff --git a/qpdf/qtest/qpdf.test b/qpdf/qtest/qpdf.test
index 60e5ba07..8254013b 100644
--- a/qpdf/qtest/qpdf.test
+++ b/qpdf/qtest/qpdf.test
@@ -2432,7 +2432,7 @@ $td->runtest("check output",
show_ntests();
# ----------
$td->notify("--- Copy Foreign Objects ---");
-$n_tests += 10;
+$n_tests += 11;
foreach my $d ([25, 1], [26, 2], [27, 3])
{
@@ -2454,6 +2454,14 @@ $td->runtest("copy objects error",
$td->EXIT_STATUS => 0},
$td->NORMALIZE_NEWLINES);
+# Issue 449 involved indirect /Filter or /DecodeParms in streams that
+# had their stream data replaced. The hand-generated
+# indirect-filter.pdf file more or less reproduces the situation but
+# doesn't result in the same internal error that 449 did with 10.0.1.
+# The file issue-449.pdf was minimized by hand from a test case and
+# does produce an internal error, though the exact reason is unclear.
+# It seems to just have to do with the order in which things are
+# copied.
$td->runtest("indirect filters",
{$td->COMMAND => "test_driver 69 indirect-filter.pdf"},
{$td->STRING => "test 69 done\n", $td->EXIT_STATUS => 0},
@@ -2464,7 +2472,10 @@ foreach my $i (0, 1)
{$td->FILE => "auto-$i.pdf"},
{$td->FILE => "indirect-filter-out-$i.pdf"});
}
-
+$td->runtest("issue 449",
+ {$td->COMMAND => "test_driver 69 issue-449.pdf"},
+ {$td->STRING => "test 69 done\n", $td->EXIT_STATUS => 0},
+ $td->NORMALIZE_NEWLINES);
show_ntests();
# ----------
diff --git a/qpdf/qtest/qpdf/indirect-filter.pdf b/qpdf/qtest/qpdf/indirect-filter.pdf
index 9717bb89..0f3e9c86 100644
--- a/qpdf/qtest/qpdf/indirect-filter.pdf
+++ b/qpdf/qtest/qpdf/indirect-filter.pdf
Binary files differ
diff --git a/qpdf/qtest/qpdf/issue-449.pdf b/qpdf/qtest/qpdf/issue-449.pdf
new file mode 100644
index 00000000..e588e0a7
--- /dev/null
+++ b/qpdf/qtest/qpdf/issue-449.pdf
Binary files differ