Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(350)

Side by Side Diff: testing/resources/bug_680376.pdf

Issue 2636403003: Bad indexing in CPDF_Document::FindPageIndex when page tree corrupt. (Closed)
Patch Set: return -1 for out-of-range Created 3 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
(Empty)
1 %PDF-1.7
2 % ò¤ô
3 1 0 obj <<
4 /Type /Catalog
5 /Pages 2 0 R
6 /Names <<
7 /Dests 10 0 R
8 >>
9 /Dests 14 0 R
10 >>
11 endobj
12 2 0 obj <<
13 /Type /Pages
14 /Count 4
15 /Kids [
16 5 0 R
17 6 0 R
18 ]
19 >>
20 endobj
21 % Page number 0.
22 3 0 obj <<
23 /Type /Page
24 /Parent 2 0 R
25 /Resources <<
26 /Font <</F1 15 0 R>>
27 >>
28 /Contents [21 0 R]
29 /MediaBox [0 0 612 792]
30 >>
31 endobj
32 % Page number 1.
33 4 0 obj <<
34 /Type /Page
35 /Parent 2 0 R
36 /Resources <<
37 /Font <</F1 15 0 R>>
38 >>
39 /Contents [22 0 R]
40 /MediaBox [0 0 612 792]
41 >>
42 endobj
43 % Tree node with bad Count, duplicated kids.
44 5 0 obj <<
45 /Type /Pages
46 /Parent 2 0 R
47 /Count 2
48 /Kids [
49 3 0 R
50 3 0 R
51 3 0 R
52 3 0 R
53 ]
54 >>
55 endobj
56 % tree node with actual kids
57 6 0 obj <<
58 /Type /Pages
59 /Count 2
60 /Kids [
61 3 0 R
62 4 0 R
63 ]
64 >>
65 % Root of Dests NameTree
66 10 0 obj <<
67 /Kids [
68 11 0 R
69 12 0 R
70 ]
71 >>
72 endobj
73 % Left child for Dests NameTree
74 11 0 obj <<
75 /Names [
76 (First) [4 0 R]
77 ]
78 >>
79 endobj
80 % Right child for Dests NameTree
81 12 0 obj <<
82 /Names [
83 (WrongKey) <</Fail [10 /FitH]>>
84 (WrongType) /NameNotAllowedHere
85 ]
86 >>
87 endobj
88 % Old-style top-level Dests dictionary. Note that FirstAlternate
89 % intentionally references non-exisstant page 11 and LastAlternate
90 % intentionally references non-existant object 999.
91 14 0 obj <<
92 /FirstAlternate [11 /XYZ 200 400 800]
93 /LastAlternate <</D [999 0 R /XYZ 0 0 -200]>>
94 >>
95 endobj
96 % Font resource.
97 15 0 obj <<
98 /Type /Font
99 /Subtype /Type1
100 /BaseFont /Arial
101 >>
102 endobj
103 % Content for page 0.
104 21 0 obj <<
105 /Length 0
106 >>
107 stream
108 BT
109 /F1 20 Tf
110 100 600 TD (Page1)Tj
111 ET
112 endstream
113 endobj
114 % Content for page 1.
115 22 0 obj <<
116 /Length 0
117 >>
118 stream
119 BT
120 /F1 20 Tf
121 100 600 TD (Page2)Tj
122 ET
123 endstream
124 endobj
125 xref
126 0 23
127 0000000000 65535 f
128 0000000015 00000 n
129 0000000119 00000 n
130 0000000217 00000 n
131 0000000378 00000 n
132 0000000568 00000 n
133 0000000714 00000 n
134 0000000000 65535 f
135 0000000000 65535 f
136 0000000000 65535 f
137 0000000813 00000 n
138 0000000903 00000 n
139 0000000993 00000 n
140 0000000000 65535 f
141 0000001287 00000 n
142 0000001415 00000 n
143 0000000000 65535 f
144 0000000000 65535 f
145 0000000000 65535 f
146 0000000000 65535 f
147 0000000000 65535 f
148 0000001510 00000 n
149 0000001620 00000 n
150 trailer <<
151 /Size 6
152 /Root 1 0 R
153 >>
154 startxref
155 1708
156 %%EOF
OLDNEW
« core/fpdfapi/parser/cpdf_document.cpp ('K') | « testing/resources/bug_680376.in ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698