Change one more password arg to ByteString.
Force conversion from raw char* to happen as early as possible once
we cross the public API (implicitly from FPDF_ public string type).
Change-Id: I07f742942d1faf549782b06d6d14edd387da1b5b
Reviewed-on: https://pdfium-review.googlesource.com/c/pdfium/+/83670
Auto-Submit: Tom Sepez <tsepez@chromium.org>
Commit-Queue: Tom Sepez <tsepez@chromium.org>
Commit-Queue: Lei Zhang <thestig@chromium.org>
Reviewed-by: Lei Zhang <thestig@chromium.org>
diff --git a/core/fpdfapi/parser/cpdf_document.cpp b/core/fpdfapi/parser/cpdf_document.cpp
index 1f1a784..bb90d99 100644
--- a/core/fpdfapi/parser/cpdf_document.cpp
+++ b/core/fpdfapi/parser/cpdf_document.cpp
@@ -143,7 +143,7 @@
CPDF_Parser::Error CPDF_Document::LoadDoc(
const RetainPtr<IFX_SeekableReadStream>& pFileAccess,
- const char* password) {
+ const ByteString& password) {
if (!m_pParser)
SetParser(std::make_unique<CPDF_Parser>(this));
diff --git a/core/fpdfapi/parser/cpdf_document.h b/core/fpdfapi/parser/cpdf_document.h
index 7c856ed..a296c00 100644
--- a/core/fpdfapi/parser/cpdf_document.h
+++ b/core/fpdfapi/parser/cpdf_document.h
@@ -117,7 +117,7 @@
CPDF_Parser::Error LoadDoc(
const RetainPtr<IFX_SeekableReadStream>& pFileAccess,
- const char* password);
+ const ByteString& password);
CPDF_Parser::Error LoadLinearizedDoc(
const RetainPtr<CPDF_ReadValidator>& validator,
const ByteString& password);