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

Side by Side Diff: core/fpdfapi/fpdf_page/fpdf_page_parser.cpp

Issue 2027053002: Relax checks added in commit 8f3a311. (Closed) Base URL: https://pdfium.googlesource.com/pdfium@bug_616248
Patch Set: components Created 4 years, 6 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
« no previous file with comments | « core/fpdfapi/fpdf_page/cpdf_meshstream.cpp ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2014 PDFium Authors. All rights reserved. 1 // Copyright 2014 PDFium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 // Original code copyright 2014 Foxit Software Inc. http://www.foxitsoftware.com 5 // Original code copyright 2014 Foxit Software Inc. http://www.foxitsoftware.com
6 6
7 #include "core/fpdfapi/fpdf_page/pageint.h" 7 #include "core/fpdfapi/fpdf_page/pageint.h"
8 8
9 #include <vector> 9 #include <vector>
10 10
(...skipping 128 matching lines...) Expand 10 before | Expand all | Expand 10 after
139 FX_FLOAT x; 139 FX_FLOAT x;
140 FX_FLOAT y; 140 FX_FLOAT y;
141 stream.GetCoords(x, y); 141 stream.GetCoords(x, y);
142 if (bStarted) { 142 if (bStarted) {
143 rect.UpdateRect(x, y); 143 rect.UpdateRect(x, y);
144 } else { 144 } else {
145 rect.InitRect(x, y); 145 rect.InitRect(x, y);
146 bStarted = true; 146 bStarted = true;
147 } 147 }
148 } 148 }
149 FX_SAFE_UINT32 nBits = stream.comps(); 149 FX_SAFE_UINT32 nBits = stream.Components();
150 nBits *= stream.CompBits(); 150 nBits *= stream.ComponentBits();
151 nBits *= color_count; 151 nBits *= color_count;
152 if (!nBits.IsValid()) 152 if (!nBits.IsValid())
153 break; 153 break;
154 154
155 stream.BitStream()->SkipBits(nBits.ValueOrDie()); 155 stream.BitStream()->SkipBits(nBits.ValueOrDie());
156 if (bGouraud) 156 if (bGouraud)
157 stream.BitStream()->ByteAlign(); 157 stream.BitStream()->ByteAlign();
158 } 158 }
159 rect.Transform(&matrix); 159 rect.Transform(&matrix);
160 return rect; 160 return rect;
(...skipping 1535 matching lines...) Expand 10 before | Expand all | Expand 10 after
1696 } else { 1696 } else {
1697 PDF_ReplaceAbbr(pElement); 1697 PDF_ReplaceAbbr(pElement);
1698 } 1698 }
1699 } 1699 }
1700 break; 1700 break;
1701 } 1701 }
1702 default: 1702 default:
1703 break; 1703 break;
1704 } 1704 }
1705 } 1705 }
OLDNEW
« no previous file with comments | « core/fpdfapi/fpdf_page/cpdf_meshstream.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698