summaryrefslogtreecommitdiff
path: root/xfa/fde
diff options
context:
space:
mode:
Diffstat (limited to 'xfa/fde')
-rw-r--r--xfa/fde/cfde_txtedtengine.cpp2
-rw-r--r--xfa/fde/css/cfde_csstextbuf.cpp2
-rw-r--r--xfa/fde/xml/cfde_xmlsyntaxparser.cpp8
-rw-r--r--xfa/fde/xml/cfde_xmlsyntaxparser.h2
4 files changed, 8 insertions, 6 deletions
diff --git a/xfa/fde/cfde_txtedtengine.cpp b/xfa/fde/cfde_txtedtengine.cpp
index b6471766db..86a501559f 100644
--- a/xfa/fde/cfde_txtedtengine.cpp
+++ b/xfa/fde/cfde_txtedtengine.cpp
@@ -123,7 +123,7 @@ void CFDE_TxtEdtEngine::SetTextByStream(
wchar_t* lpwstr = FX_Alloc(wchar_t, nPlateSize);
bool bEos = false;
while (!bEos) {
- int32_t nRead = pStream->ReadString(lpwstr, nPlateSize, bEos);
+ int32_t nRead = pStream->ReadString(lpwstr, nPlateSize, &bEos);
bPreIsCR = ReplaceParagEnd(lpwstr, nRead, bPreIsCR);
m_pTxtBuf->Insert(nIndex, lpwstr, nRead);
nIndex += nRead;
diff --git a/xfa/fde/css/cfde_csstextbuf.cpp b/xfa/fde/css/cfde_csstextbuf.cpp
index b8d8b197ae..149ed31e98 100644
--- a/xfa/fde/css/cfde_csstextbuf.cpp
+++ b/xfa/fde/css/cfde_csstextbuf.cpp
@@ -55,7 +55,7 @@ int32_t CFDE_CSSTextBuf::LoadFromStream(
if (pTxtStream->GetPosition() != iStreamOffset)
pTxtStream->Seek(FX_STREAMSEEK_Begin, iStreamOffset);
- m_iDatLen = pTxtStream->ReadString(m_pBuffer, iMaxChars, bEOS);
+ m_iDatLen = pTxtStream->ReadString(m_pBuffer, iMaxChars, &bEOS);
return m_iDatLen;
}
diff --git a/xfa/fde/xml/cfde_xmlsyntaxparser.cpp b/xfa/fde/xml/cfde_xmlsyntaxparser.cpp
index 51507526c2..78382058ec 100644
--- a/xfa/fde/xml/cfde_xmlsyntaxparser.cpp
+++ b/xfa/fde/xml/cfde_xmlsyntaxparser.cpp
@@ -105,10 +105,12 @@ CFDE_XMLSyntaxParser::CFDE_XMLSyntaxParser(
m_CurNode.iNodeNum = -1;
m_CurNode.eNodeType = FDE_XMLNODE_Unknown;
- m_iXMLPlaneSize = std::min(m_iXMLPlaneSize, m_pStream->GetLength());
+ m_iXMLPlaneSize =
+ std::min(m_iXMLPlaneSize,
+ pdfium::base::checked_cast<FX_STRSIZE>(m_pStream->GetLength()));
m_iCurrentPos = m_pStream->GetBOMLength();
- FX_SAFE_INT32 alloc_size_safe = m_iXMLPlaneSize;
+ FX_SAFE_STRSIZE alloc_size_safe = m_iXMLPlaneSize;
alloc_size_safe += 1; // For NUL.
if (!alloc_size_safe.IsValid() || alloc_size_safe.ValueOrDie() <= 0) {
m_syntaxParserResult = FDE_XmlSyntaxResult::Error;
@@ -146,7 +148,7 @@ FDE_XmlSyntaxResult CFDE_XMLSyntaxParser::DoSyntaxParse() {
m_pStream->Seek(FX_STREAMSEEK_Begin, m_iCurrentPos);
}
m_iBufferChars =
- m_pStream->ReadString(m_Buffer.data(), m_iXMLPlaneSize, m_bEOS);
+ m_pStream->ReadString(m_Buffer.data(), m_iXMLPlaneSize, &m_bEOS);
iPos = m_pStream->GetPosition();
if (m_iBufferChars < 1) {
m_iCurrentPos = iStreamLength;
diff --git a/xfa/fde/xml/cfde_xmlsyntaxparser.h b/xfa/fde/xml/cfde_xmlsyntaxparser.h
index 9f1274fa83..f229cc02b1 100644
--- a/xfa/fde/xml/cfde_xmlsyntaxparser.h
+++ b/xfa/fde/xml/cfde_xmlsyntaxparser.h
@@ -98,7 +98,7 @@ class CFDE_XMLSyntaxParser {
void ParseTextChar(wchar_t ch);
CFX_RetainPtr<IFGAS_Stream> m_pStream;
- int32_t m_iXMLPlaneSize;
+ FX_STRSIZE m_iXMLPlaneSize;
int32_t m_iCurrentPos;
int32_t m_iCurrentNodeNum;
int32_t m_iLastNodeNum;