| Index: xfa/fde/xml/cfx_saxreader.cpp
|
| diff --git a/xfa/fde/xml/cfx_saxreader.cpp b/xfa/fde/xml/cfx_saxreader.cpp
|
| index ec22c735416f8eacbb293b8ce58477639c275e75..b616516490de2837be80a4cd4797ddd2ba1ba289 100644
|
| --- a/xfa/fde/xml/cfx_saxreader.cpp
|
| +++ b/xfa/fde/xml/cfx_saxreader.cpp
|
| @@ -84,7 +84,8 @@ FX_BOOL CFX_SAXFile::StartFile(IFX_FileRead* pFile,
|
| }
|
| m_dwBufSize = std::min(dwLen, kSaxFileBufSize);
|
| m_pBuf = FX_Alloc(uint8_t, m_dwBufSize);
|
| - if (!pFile->ReadBlock(m_pBuf, dwStart, m_dwBufSize)) {
|
| + if (pFile->ReadBlock(m_pBuf, dwStart, m_dwBufSize) != m_dwBufSize &&
|
| + !pFile->IsEOF()) {
|
| return FALSE;
|
| }
|
| m_dwStart = dwStart;
|
| @@ -101,7 +102,8 @@ FX_BOOL CFX_SAXFile::ReadNextBlock() {
|
| return FALSE;
|
| }
|
| m_dwBufSize = std::min(dwSize, kSaxFileBufSize);
|
| - if (!m_pFile->ReadBlock(m_pBuf, m_dwCur, m_dwBufSize)) {
|
| + if (m_pFile->ReadBlock(m_pBuf, m_dwCur, m_dwBufSize) != m_dwBufSize &&
|
| + !m_pFile->IsEOF()) {
|
| return FALSE;
|
| }
|
| m_dwBufIndex = 0;
|
|
|