| OLD | NEW |
| 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 Loading... |
| 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 Loading... |
| 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 } |
| OLD | NEW |