summaryrefslogtreecommitdiff
path: root/fpdfsdk/fpdf_ext.cpp
diff options
context:
space:
mode:
authortsepez <tsepez@chromium.org>2016-04-04 16:41:35 -0700
committerCommit bot <commit-bot@chromium.org>2016-04-04 16:41:35 -0700
commit28f97ff783c16f3391384ce97b765ce4eb310ac7 (patch)
tree69c4c8bc9dd39d5336c96f28b633d197dd207c81 /fpdfsdk/fpdf_ext.cpp
parented9c4386713084f37548b46ab36f618021f716f5 (diff)
downloadpdfium-28f97ff783c16f3391384ce97b765ce4eb310ac7.tar.xz
Make down-conversion explicit from CFX_ByteString to CFX_ByteStringC.
Having this happen implicitly can be dangerous because the lifetime has to be considered; we should have caught the "red bots" in https://codereview.chromium.org/1847333004/#ps60001 at compile time. Review URL: https://codereview.chromium.org/1853233002
Diffstat (limited to 'fpdfsdk/fpdf_ext.cpp')
-rw-r--r--fpdfsdk/fpdf_ext.cpp5
1 files changed, 3 insertions, 2 deletions
diff --git a/fpdfsdk/fpdf_ext.cpp b/fpdfsdk/fpdf_ext.cpp
index 484993c6a1..a1009c5cdf 100644
--- a/fpdfsdk/fpdf_ext.cpp
+++ b/fpdfsdk/fpdf_ext.cpp
@@ -104,10 +104,11 @@ FX_BOOL CheckSharedForm(const CXML_Element* pElement, CFX_ByteString cbName) {
pElement->GetAttrByIndex(i, space, name, value);
if (space == "xmlns" && name == "adhocwf" &&
value == L"http://ns.adobe.com/AcrobatAdhocWorkflow/1.0/") {
- CXML_Element* pVersion = pElement->GetElement("adhocwf", cbName);
+ CXML_Element* pVersion =
+ pElement->GetElement("adhocwf", cbName.AsByteStringC());
if (!pVersion)
continue;
- CFX_WideString wsContent = pVersion->GetContent(0); // == 1.1
+ CFX_WideString wsContent = pVersion->GetContent(0);
int nType = wsContent.GetInteger();
switch (nType) {
case 1: