diff options
author | Bo Xu <bo_xu@foxitsoftware.com> | 2014-05-27 11:05:32 -0700 |
---|---|---|
committer | Bo Xu <bo_xu@foxitsoftware.com> | 2014-05-27 11:05:32 -0700 |
commit | db140c844a119fc42d1b3312db3cd729f5651fb7 (patch) | |
tree | ac7f59af800c120cb4b671d65425771e7ba85abf /core/src | |
parent | 282e53ded7e9f3d1ee5792d53def1b172ae6bb65 (diff) | |
download | pdfium-db140c844a119fc42d1b3312db3cd729f5651fb7.tar.xz |
Use unsigned type for decoding in _A85Decode.
The local variable res can overflow over 2^31-1 and so
we must use unsigned type for decoding.
BUG=none
R=bo_xu@foxitsoftware.com
Review URL: https://codereview.chromium.org/288983009
Diffstat (limited to 'core/src')
-rw-r--r-- | core/src/fpdfapi/fpdf_parser/fpdf_parser_decode.cpp | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/core/src/fpdfapi/fpdf_parser/fpdf_parser_decode.cpp b/core/src/fpdfapi/fpdf_parser/fpdf_parser_decode.cpp index dfc26bc197..c395283fc3 100644 --- a/core/src/fpdfapi/fpdf_parser/fpdf_parser_decode.cpp +++ b/core/src/fpdfapi/fpdf_parser/fpdf_parser_decode.cpp @@ -44,7 +44,8 @@ FX_DWORD _A85Decode(const FX_BYTE* src_buf, FX_DWORD src_size, FX_LPBYTE& dest_b if (dest_buf == NULL) { return (FX_DWORD) - 1; } - int state = 0, res = 0; + int state = 0; + FX_UINT32 res = 0; pos = dest_size = 0; while (pos < src_size) { FX_BYTE ch = src_buf[pos++]; |