diff options
author | Tom Sepez <tsepez@chromium.org> | 2017-05-23 17:21:01 -0700 |
---|---|---|
committer | Chromium commit bot <commit-bot@chromium.org> | 2017-05-24 16:41:29 +0000 |
commit | 08f4b7762a4453818c76c680f5295986e21418ce (patch) | |
tree | c6a771759b639180add570f4dd882d103f8efe9c /core/fpdfapi/edit/cpdf_creator.cpp | |
parent | 129b0135adf99be8e2c3015267a4689c6d62dca1 (diff) | |
download | pdfium-08f4b7762a4453818c76c680f5295986e21418ce.tar.xz |
Convert to CFX_UnownedPtr, part 4.
Fix strange ownership issue in cpdf_type3char.cpp, and
describe the absolutely insane stuff happening there.
Change-Id: Iae70f9eca8f125ed3ef677729f1776ba9f10183c
Reviewed-on: https://pdfium-review.googlesource.com/5830
Reviewed-by: Lei Zhang <thestig@chromium.org>
Commit-Queue: Tom Sepez <tsepez@chromium.org>
Diffstat (limited to 'core/fpdfapi/edit/cpdf_creator.cpp')
-rw-r--r-- | core/fpdfapi/edit/cpdf_creator.cpp | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/core/fpdfapi/edit/cpdf_creator.cpp b/core/fpdfapi/edit/cpdf_creator.cpp index b318c7a7df..1c0cd69a4b 100644 --- a/core/fpdfapi/edit/cpdf_creator.cpp +++ b/core/fpdfapi/edit/cpdf_creator.cpp @@ -513,7 +513,7 @@ int32_t CPDF_Creator::WriteDoc_Stage2() { if (m_pEncryptDict && m_pEncryptDict->IsInline()) { m_dwLastObjNum += 1; FX_FILESIZE saveOffset = m_Archive->CurrentOffset(); - if (!WriteIndirectObj(m_dwLastObjNum, m_pEncryptDict)) + if (!WriteIndirectObj(m_dwLastObjNum, m_pEncryptDict.Get())) return -1; m_ObjectOffsets[m_dwLastObjNum] = saveOffset; @@ -819,10 +819,10 @@ void CPDF_Creator::InitID() { CFX_ByteString user_pass = m_pParser->GetPassword(); uint32_t flag = PDF_ENCRYPT_CONTENT; CPDF_SecurityHandler handler; - handler.OnCreate(m_pEncryptDict, m_pIDArray.get(), user_pass.raw_str(), - user_pass.GetLength(), flag); + handler.OnCreate(m_pEncryptDict.Get(), m_pIDArray.get(), + user_pass.raw_str(), user_pass.GetLength(), flag); m_pCryptoHandler = pdfium::MakeRetain<CPDF_CryptoHandler>(); - m_pCryptoHandler->Init(m_pEncryptDict, &handler); + m_pCryptoHandler->Init(m_pEncryptDict.Get(), &handler); m_bSecurityChanged = true; } } |