Chromium Code Reviews| Index: core/fpdfapi/parser/cpdf_stream.cpp |
| diff --git a/core/fpdfapi/parser/cpdf_stream.cpp b/core/fpdfapi/parser/cpdf_stream.cpp |
| index 11ef1d2dc18cceed17dc1ceb115aed0715c73c40..9272522cd7aa922150cc9395aa3acf1fcc964c33 100644 |
| --- a/core/fpdfapi/parser/cpdf_stream.cpp |
| +++ b/core/fpdfapi/parser/cpdf_stream.cpp |
| @@ -105,7 +105,7 @@ bool CPDF_Stream::ReadRawData(FX_FILESIZE offset, |
| uint8_t* buf, |
| uint32_t size) const { |
| if (m_bMemoryBased && m_pFile) |
| - return m_pFile->ReadBlock(buf, offset, size); |
| + return m_pFile->ReadBlock(buf, offset, size) == size || m_pFile->IsEOF(); |
|
Tom Sepez
2016/11/16 18:32:00
This will return success if a short read at EOF.
|
| if (m_pDataBuf) |
| FXSYS_memcpy(buf, m_pDataBuf.get() + offset, size); |