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

Unified Diff: xfa/fgas/crt/fgas_stream.cpp

Issue 1842633004: Fix CData parsing in CFDE_XMLSyntaxParser. (Closed) Base URL: https://pdfium.googlesource.com/pdfium.git@master
Patch Set: Fix windows xfa Created 4 years, 9 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 | « xfa/fde/xml/fde_xml_imp_unittest.cpp ('k') | xfa/fgas/crt/fgas_system.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: xfa/fgas/crt/fgas_stream.cpp
diff --git a/xfa/fgas/crt/fgas_stream.cpp b/xfa/fgas/crt/fgas_stream.cpp
index 8ab2f9fd37826da05eb7e9410ac6a767c99f1c86..94468e23da4781f199bdd0bd0ee6ebe27ac1d24a 100644
--- a/xfa/fgas/crt/fgas_stream.cpp
+++ b/xfa/fgas/crt/fgas_stream.cpp
@@ -870,8 +870,9 @@ int32_t CFX_BufferStreamImp::ReadString(FX_WCHAR* pStr,
}
const FX_WCHAR* pSrc = (const FX_WCHAR*)(FX_CHAR*)(m_pData + m_iPosition);
int32_t iCount = 0;
- while (*pSrc != L'\0' && iCount < iLen) {
- *pStr++ = *pSrc++, iCount++;
+ while (*pSrc && iCount < iLen) {
+ *pStr++ = *pSrc++;
+ iCount++;
}
m_iPosition += iCount * 2;
bEOS = (*pSrc == L'\0') || (m_iPosition >= m_iLength);
@@ -1345,6 +1346,7 @@ int32_t CFX_Stream::ReadString(FX_WCHAR* pStr,
}
return iLen;
}
+
int32_t CFX_Stream::WriteData(const uint8_t* pBuffer, int32_t iBufferSize) {
FXSYS_assert(pBuffer != NULL && iBufferSize > 0);
if (m_pStreamImp == NULL) {
« no previous file with comments | « xfa/fde/xml/fde_xml_imp_unittest.cpp ('k') | xfa/fgas/crt/fgas_system.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698