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

Side by Side Diff: core/src/fpdfapi/fpdf_parser/fpdf_parser_parser.cpp

Issue 294353002: Fix warnings in android build, fix font rendering issue, fix issue 357588: wrong characters represe… (Closed) Base URL: https://pdfium.googlesource.com/pdfium.git@master
Patch Set: Patch Set after rebase Created 6 years, 7 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
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 "../../../include/fpdfapi/fpdf_parser.h" 7 #include "../../../include/fpdfapi/fpdf_parser.h"
8 #include "../../../include/fpdfapi/fpdf_module.h" 8 #include "../../../include/fpdfapi/fpdf_module.h"
9 #include "../../../include/fpdfapi/fpdf_page.h" 9 #include "../../../include/fpdfapi/fpdf_page.h"
10 #include "../fpdf_page/pageint.h" 10 #include "../fpdf_page/pageint.h"
(...skipping 2383 matching lines...) Expand 10 before | Expand all | Expand 10 after
2394 if (bTypeOnly) { 2394 if (bTypeOnly) {
2395 return (CPDF_Object*)PDFOBJ_INVALID; 2395 return (CPDF_Object*)PDFOBJ_INVALID;
2396 } 2396 }
2397 return NULL; 2397 return NULL;
2398 } 2398 }
2399 CPDF_Stream* CPDF_SyntaxParser::ReadStream(CPDF_Dictionary* pDict, PARSE_CONTEXT * pContext, 2399 CPDF_Stream* CPDF_SyntaxParser::ReadStream(CPDF_Dictionary* pDict, PARSE_CONTEXT * pContext,
2400 FX_DWORD objnum, FX_DWORD gennum) 2400 FX_DWORD objnum, FX_DWORD gennum)
2401 { 2401 {
2402 CPDF_Object* pLenObj = pDict->GetElement(FX_BSTRC("Length")); 2402 CPDF_Object* pLenObj = pDict->GetElement(FX_BSTRC("Length"));
2403 FX_DWORD len = 0; 2403 FX_DWORD len = 0;
2404 if (pLenObj && (pLenObj->GetType() != PDFOBJ_REFERENCE || 2404 if (pLenObj && ((pLenObj->GetType() != PDFOBJ_REFERENCE) ||
2405 ((((CPDF_Reference*)pLenObj)->GetObjList() != NULL) && 2405 ((((CPDF_Reference*)pLenObj)->GetObjList() != NULL) &&
2406 ((CPDF_Reference*)pLenObj)->GetRefObjNum() != objnum))) { 2406 ((CPDF_Reference*)pLenObj)->GetRefObjNum() != objnum))) {
2407 FX_FILESIZE pos = m_Pos; 2407 FX_FILESIZE pos = m_Pos;
2408 if (pLenObj) { 2408 if (pLenObj) {
2409 len = pLenObj->GetInteger(); 2409 len = pLenObj->GetInteger();
2410 } 2410 }
2411 m_Pos = pos; 2411 m_Pos = pos;
2412 if (len > 0x40000000) { 2412 if (len > 0x40000000) {
2413 return NULL; 2413 return NULL;
2414 } 2414 }
(...skipping 1954 matching lines...) Expand 10 before | Expand all | Expand 10 after
4369 { 4369 {
4370 FX_INT32 iSize = m_childNode.GetSize(); 4370 FX_INT32 iSize = m_childNode.GetSize();
4371 for (FX_INT32 i = 0; i < iSize; ++i) { 4371 for (FX_INT32 i = 0; i < iSize; ++i) {
4372 CPDF_PageNode *pNode = (CPDF_PageNode*)m_childNode[i]; 4372 CPDF_PageNode *pNode = (CPDF_PageNode*)m_childNode[i];
4373 if (pNode) { 4373 if (pNode) {
4374 delete pNode; 4374 delete pNode;
4375 } 4375 }
4376 } 4376 }
4377 m_childNode.RemoveAll(); 4377 m_childNode.RemoveAll();
4378 } 4378 }
OLDNEW
« no previous file with comments | « core/src/fpdfapi/fpdf_page/fpdf_page_parser_old.cpp ('k') | core/src/fpdfapi/fpdf_render/fpdf_render.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698