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

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

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 {{header}}
2 {{object 1 0}} <<
3 /Type /Catalog
4 /Pages 2 0 R
5 /Names <<
6 /Dests 10 0 R
7 >>
8 /Dests 14 0 R
9 >>
10 endobj
11 {{object 2 0}} <<
12 /Type /Pages
13 /Count 4
14 /Kids [
15 5 0 R
16 6 0 R
17 ]
18 >>
19 endobj
20 % Page number 0.
21 {{object 3 0}} <<
22 /Type /Page
23 /Parent 2 0 R
24 /Resources <<
25 /Font <</F1 15 0 R>>
26 >>
27 /Contents [21 0 R]
28 /MediaBox [0 0 612 792]
29 >>
30 endobj
31 % Page number 1.
32 {{object 4 0}} <<
33 /Type /Page
34 /Parent 2 0 R
35 /Resources <<
36 /Font <</F1 15 0 R>>
37 >>
38 /Contents [22 0 R]
39 /MediaBox [0 0 612 792]
40 >>
41 endobj
42 % Tree node with bad Count, duplicated kids.
43 {{object 5 0}} <<
44 /Type /Pages
45 /Parent 2 0 R
46 /Count 2
47 /Kids [
48 3 0 R
49 3 0 R
50 3 0 R
51 3 0 R
52 ]
53 >>
54 endobj
55 % tree node with actual kids
56 {{object 6 0}} <<
57 /Type /Pages
58 /Count 2
59 /Kids [
60 3 0 R
61 4 0 R
62 ]
63 >>
64 % Root of Dests NameTree
65 {{object 10 0}} <<
66 /Kids [
67 11 0 R
68 12 0 R
69 ]
70 >>
71 endobj
72 % Left child for Dests NameTree
73 {{object 11 0}} <<
74 /Names [
75 (First) [4 0 R]
76 ]
77 >>
78 endobj
79 % Right child for Dests NameTree
80 {{object 12 0}} <<
81 /Names [
82 (WrongKey) <</Fail [10 /FitH]>>
83 (WrongType) /NameNotAllowedHere
84 ]
85 >>
86 endobj
87 % Old-style top-level Dests dictionary. Note that FirstAlternate
88 % intentionally references non-exisstant page 11 and LastAlternate
89 % intentionally references non-existant object 999.
90 {{object 14 0}} <<
91 /FirstAlternate [11 /XYZ 200 400 800]
92 /LastAlternate <</D [999 0 R /XYZ 0 0 -200]>>
93 >>
94 endobj
95 % Font resource.
96 {{object 15 0}} <<
97 /Type /Font
98 /Subtype /Type1
99 /BaseFont /Arial
100 >>
101 endobj
102 % Content for page 0.
103 {{object 21 0}} <<
104 /Length 0
105 >>
106 stream
107 BT
108 /F1 20 Tf
109 100 600 TD (Page1)Tj
110 ET
111 endstream
112 endobj
113 % Content for page 1.
114 {{object 22 0}} <<
115 /Length 0
116 >>
117 stream
118 BT
119 /F1 20 Tf
120 100 600 TD (Page2)Tj
121 ET
122 endstream
123 endobj
124 {{xref}}
125 trailer <<
126 /Size 6
127 /Root 1 0 R
128 >>
129 {{startxref}}
130 %%EOF
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698