From c009e8e6bfefa4f77bc02ac0b359b9fe58af384f Mon Sep 17 00:00:00 2001 From: Wei Li Date: Tue, 5 Jan 2016 12:51:32 -0800 Subject: Merge to XFA: Exit infinite loops for cross reference loading When cross reference sections form a loop, our code will enter an infinite loop. Add detection and exit code for v4 cross reference loading. V5 loading was done previously. TBR=thestig@chromium.org Review URL: https://codereview.chromium.org/1558093002 . (cherry picked from commit aab8f462ea3368ed4825172231131e1a10db978d) Review URL: https://codereview.chromium.org/1556423002 . --- testing/resources/bug_xrefv4_loop.pdf | 45 +++++++++++++++++++++++++++++++++++ 1 file changed, 45 insertions(+) create mode 100644 testing/resources/bug_xrefv4_loop.pdf (limited to 'testing') diff --git a/testing/resources/bug_xrefv4_loop.pdf b/testing/resources/bug_xrefv4_loop.pdf new file mode 100644 index 0000000000..c1169773f7 --- /dev/null +++ b/testing/resources/bug_xrefv4_loop.pdf @@ -0,0 +1,45 @@ +%PDF-1.7 +% ò¤ô +1 0 obj << + /Type /Catalog + /Pages 2 0 R +>> +endobj +2 0 obj << + /Type /Pages + /Count 1 + /Kids [ + 3 0 R + ] +>> +endobj +3 0 obj << + /Type /Page + /Parent 2 0 R + /MediaBox [0 0 612 792] +>> +endobj +xref +0 2 +0000000000 65535 f +0000000015 00000 n +trailer << + /Prev 346 +>> +xref +2 1 +0000000068 00000 n +trailer << + /Prev 216 +>> +xref +3 1 +0000000139 00000 n +trailer << + /Size 4 + /Prev 291 + /Root 1 0 R +>> +startxref +346 +%%EOF -- cgit v1.2.3