commit 8993cef512f4545c0e407a733bae4fa4225f3989 from: Sven M. Hallberg date: Tue Aug 09 19:02:14 2022 UTC add a test case for cyclically defined objects This commit contains a failing test case. It contains a stream with a /Type entry that is an indirect reference to an object defined as itself: obj 8 0 8 0 R endobj The implementation of resolve() does not properly detect cycles and runs into an infinite loop. commit - 5010a4dc4459f9d3cc94dcf635285b317085b578 commit + 8993cef512f4545c0e407a733bae4fa4225f3989 blob - /dev/null blob + be67696abfef0b34980551ecc6ad61dce956dc6d (mode 644) --- /dev/null +++ test/valid/selfref.pdf @@ -0,0 +1,79 @@ +%PDF-1.4 +1 0 obj + << /Type /Catalog + /Outlines 2 0 R + /Pages 3 0 R + >> +endobj + +2 0 obj + << /Type /Outlines + /Count 0 + >> +endobj + +3 0 obj + << /Type /Pages + /Kids [4 0 R] + /Count 1 + >> +endobj + +4 0 obj + << /Type /Page + /Parent 3 0 R + /MediaBox [0 0 612 792] + /Contents 5 0 R + /Resources << /ProcSet 6 0 R + /Font << /F1 7 0 R >> + >> + >> +endobj + +5 0 obj + << /Length 76 /Type 8 0 R >> +stream + BT + /F1 24 Tf + 100 100 Td + (Hello World) Tj + ET +endstream +endobj + +6 0 obj + [/PDF /Text] +endobj + +7 0 obj + << /Type /Font + /Subtype /Type1 + /Name /F1 + /BaseFont /Helvetica + /Encoding /MacRomanEncoding + >> +endobj + +8 0 obj + 8 0 R +endobj + +xref +0 9 +0000000000 65535 f +0000000009 00000 n +0000000097 00000 n +0000000159 00000 n +0000000239 00000 n +0000000456 00000 n +0000000598 00000 n +0000000631 00000 n +0000000776 00000 n + +trailer + << /Size 9 + /Root 1 0 R + >> +startxref +802 +%%EOF