summaryrefslogtreecommitdiff
path: root/core/fpdfapi/parser/cpdf_parser.cpp
diff options
context:
space:
mode:
authorArtem Strygin <art-snake@yandex-team.ru>2017-08-31 15:01:28 +0300
committerChromium commit bot <commit-bot@chromium.org>2017-08-31 20:11:26 +0000
commit3c6b72f79fce629c903ce31f07092df23f870bb6 (patch)
treefd0b1f710bdaaed13523ceb3580df71a5d9d8977 /core/fpdfapi/parser/cpdf_parser.cpp
parent0872b04ea41ba6706e42b28f632ab190bc77dede (diff)
downloadpdfium-3c6b72f79fce629c903ce31f07092df23f870bb6.tar.xz
Disable objects decryption if it is useless.
Change-Id: I6a588b4af4cfede922bc3756be749e9e30e3e8e5 Reviewed-on: https://pdfium-review.googlesource.com/12370 Reviewed-by: dsinclair <dsinclair@chromium.org> Commit-Queue: Art Snake <art-snake@yandex-team.ru>
Diffstat (limited to 'core/fpdfapi/parser/cpdf_parser.cpp')
-rw-r--r--core/fpdfapi/parser/cpdf_parser.cpp8
1 files changed, 4 insertions, 4 deletions
diff --git a/core/fpdfapi/parser/cpdf_parser.cpp b/core/fpdfapi/parser/cpdf_parser.cpp
index c57d65e78e..fffa7f9b00 100644
--- a/core/fpdfapi/parser/cpdf_parser.cpp
+++ b/core/fpdfapi/parser/cpdf_parser.cpp
@@ -870,7 +870,7 @@ bool CPDF_Parser::RebuildCrossRef() {
m_pSyntax->SetPos(pos + i - m_pSyntax->m_HeaderOffset);
std::unique_ptr<CPDF_Object> pObj =
- m_pSyntax->GetObject(m_pDocument.Get(), 0, 0, true);
+ m_pSyntax->GetObject(m_pDocument.Get(), 0, 0, false);
if (pObj) {
if (pObj->IsDictionary() || pObj->AsStream()) {
CPDF_Stream* pStream = pObj->AsStream();
@@ -1232,7 +1232,7 @@ std::unique_ptr<CPDF_Object> CPDF_Parser::ParseIndirectObject(
return nullptr;
syntax.SetPos(offset + it->second);
- return syntax.GetObject(pObjList, 0, 0, true);
+ return syntax.GetObject(pObjList, 0, 0, false);
}
CFX_RetainPtr<CPDF_StreamAcc> CPDF_Parser::GetObjectStream(uint32_t objnum) {
@@ -1328,7 +1328,7 @@ std::unique_ptr<CPDF_Dictionary> CPDF_Parser::LoadTrailerV4() {
if (m_pSyntax->GetKeyword() != "trailer")
return nullptr;
- return ToDictionary(m_pSyntax->GetObject(m_pDocument.Get(), 0, 0, true));
+ return ToDictionary(m_pSyntax->GetObject(m_pDocument.Get(), 0, 0, false));
}
uint32_t CPDF_Parser::GetPermissions() const {
@@ -1365,7 +1365,7 @@ bool CPDF_Parser::ParseLinearizedHeader() {
}
m_pLinearized = CPDF_LinearizedHeader::CreateForObject(
- m_pSyntax->GetObject(nullptr, objnum, gennum, true));
+ m_pSyntax->GetObject(nullptr, objnum, gennum, false));
if (!m_pLinearized)
return false;