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

Unified Diff: core/fpdfapi/fpdf_parser/cpdf_stream.cpp

Issue 2430743003: in the attempt to fix 627393, changed IFX_FileRead's readBlock to return the length it reads
Patch Set: remove .tmp files Created 4 years, 2 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
Index: core/fpdfapi/fpdf_parser/cpdf_stream.cpp
diff --git a/core/fpdfapi/fpdf_parser/cpdf_stream.cpp b/core/fpdfapi/fpdf_parser/cpdf_stream.cpp
index 3b047205c470c03dc5bad279282850424e680950..30dc6eedfb3cfb4acd32ad96ea7b238079912fd9 100644
--- a/core/fpdfapi/fpdf_parser/cpdf_stream.cpp
+++ b/core/fpdfapi/fpdf_parser/cpdf_stream.cpp
@@ -103,7 +103,7 @@ FX_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();
if (m_pDataBuf)
FXSYS_memcpy(buf, m_pDataBuf.get() + offset, size);

Powered by Google App Engine
This is Rietveld 408576698