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 "../../../../third_party/numerics/safe_math.h" | 10 #include "../../../../third_party/numerics/safe_math.h" |
(...skipping 2174 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2185 } | 2185 } |
2186 nKeys ++; | 2186 nKeys ++; |
2187 key = PDF_NameDecode(key); | 2187 key = PDF_NameDecode(key); |
2188 if (key == FX_BSTRC("/Contents")) { | 2188 if (key == FX_BSTRC("/Contents")) { |
2189 dwSignValuePos = m_Pos; | 2189 dwSignValuePos = m_Pos; |
2190 } | 2190 } |
2191 CPDF_Object* pObj = GetObject(pObjList, objnum, gennum, level + 1); | 2191 CPDF_Object* pObj = GetObject(pObjList, objnum, gennum, level + 1); |
2192 if (pObj == NULL) { | 2192 if (pObj == NULL) { |
2193 continue; | 2193 continue; |
2194 } | 2194 } |
2195 if (key.GetLength() == 1) { | 2195 if (key.GetLength() >= 1) { |
2196 pDict->SetAt(CFX_ByteStringC(((FX_LPCSTR)key) + 1, key.GetLength
() - 1), pObj); | |
2197 } else { | |
2198 if (nKeys < 32) { | 2196 if (nKeys < 32) { |
2199 pDict->SetAt(CFX_ByteStringC(((FX_LPCSTR)key) + 1, key.GetLe
ngth() - 1), pObj); | 2197 pDict->SetAt(CFX_ByteStringC(((FX_LPCSTR)key) + 1, key.GetLe
ngth() - 1), pObj); |
2200 } else { | 2198 } else { |
2201 pDict->AddValue(CFX_ByteStringC(((FX_LPCSTR)key) + 1, key.Ge
tLength() - 1), pObj); | 2199 pDict->AddValue(CFX_ByteStringC(((FX_LPCSTR)key) + 1, key.Ge
tLength() - 1), pObj); |
2202 } | 2200 } |
2203 } | 2201 } |
2204 } | 2202 } |
2205 if (IsSignatureDict(pDict)) { | 2203 if (IsSignatureDict(pDict)) { |
2206 FX_FILESIZE dwSavePos = m_Pos; | 2204 FX_FILESIZE dwSavePos = m_Pos; |
2207 m_Pos = dwSignValuePos; | 2205 m_Pos = dwSignValuePos; |
(...skipping 2225 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
4433 { | 4431 { |
4434 FX_INT32 iSize = m_childNode.GetSize(); | 4432 FX_INT32 iSize = m_childNode.GetSize(); |
4435 for (FX_INT32 i = 0; i < iSize; ++i) { | 4433 for (FX_INT32 i = 0; i < iSize; ++i) { |
4436 CPDF_PageNode *pNode = (CPDF_PageNode*)m_childNode[i]; | 4434 CPDF_PageNode *pNode = (CPDF_PageNode*)m_childNode[i]; |
4437 if (pNode) { | 4435 if (pNode) { |
4438 delete pNode; | 4436 delete pNode; |
4439 } | 4437 } |
4440 } | 4438 } |
4441 m_childNode.RemoveAll(); | 4439 m_childNode.RemoveAll(); |
4442 } | 4440 } |
OLD | NEW |