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

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

Issue 2384853002: Detect resursive loading of type3 font char to avoid infinite loop (Closed)
Patch Set: address comments Created 4 years, 2 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_textobject.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 <memory> 9 #include <memory>
10 #include <utility> 10 #include <utility>
(...skipping 1234 matching lines...) Expand 10 before | Expand all | Expand 10 after
1245 pCTM[2] = m_pCurStates->m_CTM.b; 1245 pCTM[2] = m_pCurStates->m_CTM.b;
1246 pCTM[3] = m_pCurStates->m_CTM.d; 1246 pCTM[3] = m_pCurStates->m_CTM.d;
1247 } 1247 }
1248 pText->SetSegments(pStrs, pKerning, nsegs); 1248 pText->SetSegments(pStrs, pKerning, nsegs);
1249 pText->m_PosX = m_pCurStates->m_TextX; 1249 pText->m_PosX = m_pCurStates->m_TextX;
1250 pText->m_PosY = m_pCurStates->m_TextY + m_pCurStates->m_TextRise; 1250 pText->m_PosY = m_pCurStates->m_TextY + m_pCurStates->m_TextRise;
1251 ConvertTextSpace(pText->m_PosX, pText->m_PosY); 1251 ConvertTextSpace(pText->m_PosX, pText->m_PosY);
1252 FX_FLOAT x_advance; 1252 FX_FLOAT x_advance;
1253 FX_FLOAT y_advance; 1253 FX_FLOAT y_advance;
1254 pText->CalcPositionData(&x_advance, &y_advance, 1254 pText->CalcPositionData(&x_advance, &y_advance,
1255 m_pCurStates->m_TextHorzScale, m_Level); 1255 m_pCurStates->m_TextHorzScale);
1256 m_pCurStates->m_TextX += x_advance; 1256 m_pCurStates->m_TextX += x_advance;
1257 m_pCurStates->m_TextY += y_advance; 1257 m_pCurStates->m_TextY += y_advance;
1258 if (TextRenderingModeIsClipMode(text_mode)) { 1258 if (TextRenderingModeIsClipMode(text_mode)) {
1259 m_ClipTextList.push_back( 1259 m_ClipTextList.push_back(
1260 std::unique_ptr<CPDF_TextObject>(pText->Clone())); 1260 std::unique_ptr<CPDF_TextObject>(pText->Clone()));
1261 } 1261 }
1262 m_pObjectHolder->GetPageObjectList()->push_back(std::move(pText)); 1262 m_pObjectHolder->GetPageObjectList()->push_back(std::move(pText));
1263 } 1263 }
1264 if (pKerning && pKerning[nsegs - 1] != 0) { 1264 if (pKerning && pKerning[nsegs - 1] != 0) {
1265 if (!pFont->IsVertWriting()) { 1265 if (!pFont->IsVertWriting()) {
(...skipping 407 matching lines...) Expand 10 before | Expand all | Expand 10 after
1673 } else { 1673 } else {
1674 PDF_ReplaceAbbr(pElement); 1674 PDF_ReplaceAbbr(pElement);
1675 } 1675 }
1676 } 1676 }
1677 break; 1677 break;
1678 } 1678 }
1679 default: 1679 default:
1680 break; 1680 break;
1681 } 1681 }
1682 } 1682 }
OLDNEW
« no previous file with comments | « core/fpdfapi/fpdf_page/cpdf_textobject.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698