Index: core/fpdfapi/fpdf_parser/fpdf_parser_decode.cpp |
diff --git a/core/fpdfapi/fpdf_parser/fpdf_parser_decode.cpp b/core/fpdfapi/fpdf_parser/fpdf_parser_decode.cpp |
index f7fc3099fc87d38d919341b026f936445cbf8c45..c91e99b9cb540066baf24a66475a6829e6f90338 100644 |
--- a/core/fpdfapi/fpdf_parser/fpdf_parser_decode.cpp |
+++ b/core/fpdfapi/fpdf_parser/fpdf_parser_decode.cpp |
@@ -177,14 +177,14 @@ FX_DWORD RunLengthDecode(const uint8_t* src_buf, |
old = dest_size; |
dest_size += src_buf[i] + 1; |
if (dest_size < old) { |
- return (FX_DWORD)-1; |
+ return static_cast<FX_DWORD>(-1); |
} |
i += src_buf[i] + 2; |
} else if (src_buf[i] > 128) { |
old = dest_size; |
dest_size += 257 - src_buf[i]; |
if (dest_size < old) { |
- return (FX_DWORD)-1; |
+ return static_cast<FX_DWORD>(-1); |
} |
i += 2; |
} else { |
@@ -192,7 +192,7 @@ FX_DWORD RunLengthDecode(const uint8_t* src_buf, |
} |
} |
if (dest_size >= _STREAM_MAX_SIZE_) { |
- return -1; |
+ return static_cast<FX_DWORD>(-1); |
} |
dest_buf = FX_Alloc(uint8_t, dest_size); |
i = 0; |