summaryrefslogtreecommitdiff
path: root/core/fpdfapi/parser/cpdf_security_handler.cpp
diff options
context:
space:
mode:
authorTom Sepez <tsepez@chromium.org>2017-05-23 17:10:46 -0700
committerChromium commit bot <commit-bot@chromium.org>2017-05-24 00:49:21 +0000
commit655c783b8077f18e17418a3aab9b5a07c8055049 (patch)
treee121b850ead5af67156b126c2e8d2fdcfa4be6a9 /core/fpdfapi/parser/cpdf_security_handler.cpp
parent6f3593c5cdf62915fc086448312671ce1fce5291 (diff)
downloadpdfium-655c783b8077f18e17418a3aab9b5a07c8055049.tar.xz
Convert to CFX_UnownedPtr, part 3.
Remove an explicit clear to re-order the member destruction order. Change-Id: I33da3f3de4b8e8e0cfbdceaf5140e98f5d6f904a Reviewed-on: https://pdfium-review.googlesource.com/5791 Reviewed-by: Lei Zhang <thestig@chromium.org> Commit-Queue: Tom Sepez <tsepez@chromium.org>
Diffstat (limited to 'core/fpdfapi/parser/cpdf_security_handler.cpp')
-rw-r--r--core/fpdfapi/parser/cpdf_security_handler.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/core/fpdfapi/parser/cpdf_security_handler.cpp b/core/fpdfapi/parser/cpdf_security_handler.cpp
index 85a3805eea..4cdf545d63 100644
--- a/core/fpdfapi/parser/cpdf_security_handler.cpp
+++ b/core/fpdfapi/parser/cpdf_security_handler.cpp
@@ -413,7 +413,7 @@ bool CPDF_SecurityHandler::CheckUserPassword(const uint8_t* password,
bool bIgnoreEncryptMeta,
uint8_t* key,
int32_t key_len) {
- CalcEncryptKey(m_pEncryptDict, password, pass_size, key, key_len,
+ CalcEncryptKey(m_pEncryptDict.Get(), password, pass_size, key, key_len,
bIgnoreEncryptMeta, m_pParser->GetIDArray());
CFX_ByteString ukey =
m_pEncryptDict ? m_pEncryptDict->GetStringFor("U") : CFX_ByteString();
@@ -578,8 +578,8 @@ void CPDF_SecurityHandler::OnCreate(CPDF_Dictionary* pEncryptDict,
pEncryptDict->SetNewFor<CPDF_String>("O", CFX_ByteString(passcode, 32),
false);
}
- CalcEncryptKey(m_pEncryptDict, (uint8_t*)user_pass, user_size, m_EncryptKey,
- key_len, false, pIdArray);
+ CalcEncryptKey(m_pEncryptDict.Get(), (uint8_t*)user_pass, user_size,
+ m_EncryptKey, key_len, false, pIdArray);
if (m_Revision < 3) {
uint8_t tempbuf[32];
memcpy(tempbuf, defpasscode, 32);