Use unsigned type for iteration to avoid int overflow.
authorJohn Abd-El-Malek <jam@chromium.org>
Wed, 4 Jun 2014 21:42:19 +0000 (14:42 -0700)
committerJohn Abd-El-Malek <jam@chromium.org>
Wed, 4 Jun 2014 21:42:19 +0000 (14:42 -0700)
commitbb2b1e72929fb78f9d5b64b3732ed9b5cc93af4e
tree90917f85699dbd714cbbad19ad6b23f849b1bfe5
parent62a7fd6bda145ca3bba0c87102a77e03b5d11037
Use unsigned type for iteration to avoid int overflow.

If src_len in PDF_DecodeText is larger than 2^31,
2 * max_chars will overflow and the function will produce
an incorrect result.

BUG=none
R=bo_xu@foxitsoftware.com

Review URL: https://codereview.chromium.org/306923006
core/src/fpdfapi/fpdf_parser/fpdf_parser_decode.cpp