| Index: core/fpdfapi/fpdf_page/fpdf_page_parser_old.cpp
|
| diff --git a/core/fpdfapi/fpdf_page/fpdf_page_parser_old.cpp b/core/fpdfapi/fpdf_page/fpdf_page_parser_old.cpp
|
| index f2b7582a0131367b5e04f006ef8c5f9029d2eb40..8bff5445ff73519f8e76506fbf48e614dfa8131d 100644
|
| --- a/core/fpdfapi/fpdf_page/fpdf_page_parser_old.cpp
|
| +++ b/core/fpdfapi/fpdf_page/fpdf_page_parser_old.cpp
|
| @@ -48,7 +48,7 @@ uint32_t DecodeAllScanlines(ICodec_ScanlineDecoder* pDecoder,
|
| uint8_t*& dest_buf,
|
| uint32_t& dest_size) {
|
| if (!pDecoder) {
|
| - return static_cast<uint32_t>(-1);
|
| + return FX_INVALID_OFFSET;
|
| }
|
| int ncomps = pDecoder->CountComps();
|
| int bpc = pDecoder->GetBPC();
|
| @@ -57,7 +57,7 @@ uint32_t DecodeAllScanlines(ICodec_ScanlineDecoder* pDecoder,
|
| int pitch = (width * ncomps * bpc + 7) / 8;
|
| if (height == 0 || pitch > (1 << 30) / height) {
|
| delete pDecoder;
|
| - return static_cast<uint32_t>(-1);
|
| + return FX_INVALID_OFFSET;
|
| }
|
| dest_buf = FX_Alloc2D(uint8_t, pitch, height);
|
| dest_size = pitch * height; // Safe since checked alloc returned.
|
|
|