| Index: core/fxcodec/codec/fx_codec_tiff.cpp
|
| diff --git a/core/fxcodec/codec/fx_codec_tiff.cpp b/core/fxcodec/codec/fx_codec_tiff.cpp
|
| index 2a00bb2d2055f9d8f05292dc1d474f600cc405b6..4d9db8ba44571d8ce824dcb34c0c7ad8910eb581 100644
|
| --- a/core/fxcodec/codec/fx_codec_tiff.cpp
|
| +++ b/core/fxcodec/codec/fx_codec_tiff.cpp
|
| @@ -90,11 +90,14 @@ namespace {
|
|
|
| tsize_t tiff_read(thandle_t context, tdata_t buf, tsize_t length) {
|
| CCodec_TiffContext* pTiffContext = (CCodec_TiffContext*)context;
|
| - if (!pTiffContext->io_in()->ReadBlock(buf, pTiffContext->offset(), length))
|
| + size_t readSize =
|
| + pTiffContext->io_in()->ReadBlock(buf, pTiffContext->offset(), length);
|
| + if (readSize != static_cast<size_t>(length) &&
|
| + !pTiffContext->io_in()->IsEOF())
|
| return 0;
|
|
|
| - pTiffContext->increment_offset(length);
|
| - return length;
|
| + pTiffContext->increment_offset(readSize);
|
| + return readSize;
|
| }
|
|
|
| tsize_t tiff_write(thandle_t context, tdata_t buf, tsize_t length) {
|
|
|