diff options
author | Artem Strygin <art-snake@yandex-team.ru> | 2018-07-24 10:14:24 +0000 |
---|---|---|
committer | Chromium commit bot <commit-bot@chromium.org> | 2018-07-24 10:14:24 +0000 |
commit | aa50728980036f07fda232cea974fd80c89b7cb7 (patch) | |
tree | 101e954b24a44f1d818923076695bd25759d6b14 /core/fpdfapi/parser/cpdf_parser.h | |
parent | c62aa207e9acb919c33df5f3694fe159619dda86 (diff) | |
download | pdfium-aa50728980036f07fda232cea974fd80c89b7cb7.tar.xz |
Fix encryption dictionary owning.
Return encryption dictionary as const reference
from CPDF_Parser.
Create a copy in CPDF_Creator if needed.
Change-Id: I270f71d307d818fba7f65ebe379f5942ae816934
Reviewed-on: https://pdfium-review.googlesource.com/38390
Reviewed-by: Lei Zhang <thestig@chromium.org>
Commit-Queue: Art Snake <art-snake@yandex-team.ru>
Diffstat (limited to 'core/fpdfapi/parser/cpdf_parser.h')
-rw-r--r-- | core/fpdfapi/parser/cpdf_parser.h | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/core/fpdfapi/parser/cpdf_parser.h b/core/fpdfapi/parser/cpdf_parser.h index 92aaf7df6a..0af39d7529 100644 --- a/core/fpdfapi/parser/cpdf_parser.h +++ b/core/fpdfapi/parser/cpdf_parser.h @@ -78,7 +78,7 @@ class CPDF_Parser { const CPDF_Array* GetIDArray() const; CPDF_Dictionary* GetRoot() const; - CPDF_Dictionary* GetEncryptDict() const { return m_pEncryptDict.get(); } + const CPDF_Dictionary* GetEncryptDict() const; std::unique_ptr<CPDF_Object> ParseIndirectObject(uint32_t objnum); @@ -141,7 +141,6 @@ class CPDF_Parser { Error LoadLinearizedMainXRefTable(); const CPDF_ObjectStream* GetObjectStream(uint32_t object_number); std::unique_ptr<CPDF_LinearizedHeader> ParseLinearizedHeader(); - void SetEncryptDictionary(const CPDF_Dictionary* pDict); void ShrinkObjectMap(uint32_t size); // A simple check whether the cross reference table matches with // the objects. @@ -172,7 +171,6 @@ class CPDF_Parser { // m_CrossRefTable must be destroyed after m_pSecurityHandler due to the // ownership of the ID array data. std::unique_ptr<CPDF_CrossRefTable> m_CrossRefTable; - std::unique_ptr<CPDF_Dictionary> m_pEncryptDict; FX_FILESIZE m_LastXRefOffset; std::unique_ptr<CPDF_SecurityHandler> m_pSecurityHandler; ByteString m_Password; |