Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(248)

Unified Diff: core/fpdfapi/fpdf_parser/cpdf_standard_crypto_handler.cpp

Issue 1870043003: Remove CFX_ByteString::Load() and operator= for CFX_ByteTextBuf (Closed) Base URL: https://pdfium.googlesource.com/pdfium.git@master
Patch Set: Created 4 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | core/fxcodec/codec/fx_codec_png.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: core/fpdfapi/fpdf_parser/cpdf_standard_crypto_handler.cpp
diff --git a/core/fpdfapi/fpdf_parser/cpdf_standard_crypto_handler.cpp b/core/fpdfapi/fpdf_parser/cpdf_standard_crypto_handler.cpp
index 46384244e8109ad7162d818bc1dc02c7e5fa7e65..6bfe1b60b3ee6281069b462c406189438a9f9c63 100644
--- a/core/fpdfapi/fpdf_parser/cpdf_standard_crypto_handler.cpp
+++ b/core/fpdfapi/fpdf_parser/cpdf_standard_crypto_handler.cpp
@@ -20,9 +20,9 @@ void IPDF_CryptoHandler::Decrypt(uint32_t objnum,
CFX_ByteString& str) {
CFX_BinaryBuf dest_buf;
void* context = DecryptStart(objnum, gennum);
- DecryptStream(context, (const uint8_t*)str, str.GetLength(), dest_buf);
+ DecryptStream(context, str.raw_str(), str.GetLength(), dest_buf);
DecryptFinish(context, dest_buf);
- str = dest_buf;
+ str = CFX_ByteString(dest_buf.GetBuffer(), dest_buf.GetSize());
}
void CPDF_StandardCryptoHandler::CryptBlock(FX_BOOL bEncrypt,
« no previous file with comments | « no previous file | core/fxcodec/codec/fx_codec_png.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698