summaryrefslogtreecommitdiff
path: root/xfa/fxfa/parser/cxfa_scriptcontext.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'xfa/fxfa/parser/cxfa_scriptcontext.cpp')
-rw-r--r--xfa/fxfa/parser/cxfa_scriptcontext.cpp12
1 files changed, 9 insertions, 3 deletions
diff --git a/xfa/fxfa/parser/cxfa_scriptcontext.cpp b/xfa/fxfa/parser/cxfa_scriptcontext.cpp
index e7c86296ee..98b5da057f 100644
--- a/xfa/fxfa/parser/cxfa_scriptcontext.cpp
+++ b/xfa/fxfa/parser/cxfa_scriptcontext.cpp
@@ -624,7 +624,9 @@ int32_t CXFA_ScriptContext::ResolveObjects(CXFA_Object* refObject,
bool bCreate =
m_ResolveProcessor->GetNodeHelper()->ResolveNodes_CreateNode(
rndFind.m_wsName, rndFind.m_wsCondition,
- nStart == wsExpression.GetLength(), this);
+ nStart ==
+ pdfium::base::checked_cast<int32_t>(wsExpression.GetLength()),
+ this);
if (bCreate) {
continue;
} else {
@@ -650,7 +652,9 @@ int32_t CXFA_ScriptContext::ResolveObjects(CXFA_Object* refObject,
continue;
}
if (rndFind.m_dwFlag == XFA_RESOVENODE_RSTYPE_Attribute &&
- rndFind.m_pScriptAttribute && nStart < wsExpression.GetLength()) {
+ rndFind.m_pScriptAttribute &&
+ nStart <
+ pdfium::base::checked_cast<int32_t>(wsExpression.GetLength())) {
auto pValue = pdfium::MakeUnique<CFXJSE_Value>(m_pIsolate);
(rndFind.m_Objects.front()
->*(rndFind.m_pScriptAttribute->lpfnCallback))(
@@ -679,7 +683,9 @@ int32_t CXFA_ScriptContext::ResolveObjects(CXFA_Object* refObject,
bool bCreate =
m_ResolveProcessor->GetNodeHelper()->ResolveNodes_CreateNode(
rndFind.m_wsName, rndFind.m_wsCondition,
- nStart == wsExpression.GetLength(), this);
+ nStart == pdfium::base::checked_cast<int32_t>(
+ wsExpression.GetLength()),
+ this);
if (bCreate) {
continue;
} else {