From c3d5c9746384ccf13617370fbc81397040355c4d Mon Sep 17 00:00:00 2001 From: Artem Strygin Date: Tue, 3 Oct 2017 20:31:00 +0300 Subject: Use ByteString instead raw string for password in CPDF_SecurityHandler. Change-Id: I598d42027d033b250134429dfdf92ba043a523a3 Reviewed-on: https://pdfium-review.googlesource.com/15310 Commit-Queue: Art Snake Reviewed-by: dsinclair --- core/fpdfapi/edit/cpdf_creator.cpp | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'core/fpdfapi/edit') diff --git a/core/fpdfapi/edit/cpdf_creator.cpp b/core/fpdfapi/edit/cpdf_creator.cpp index 3fa6817957..d6384059d1 100644 --- a/core/fpdfapi/edit/cpdf_creator.cpp +++ b/core/fpdfapi/edit/cpdf_creator.cpp @@ -806,8 +806,7 @@ void CPDF_Creator::InitID() { uint32_t flag = PDF_ENCRYPT_CONTENT; m_pSecurityHandler = pdfium::MakeUnique(); m_pSecurityHandler->OnCreate(m_pEncryptDict.Get(), m_pIDArray.get(), - user_pass.raw_str(), user_pass.GetLength(), - flag); + user_pass, flag); m_pSecurityHandler->InitCryptoHandler(); m_bSecurityChanged = true; } -- cgit v1.2.3