Fix heap buffer overflow in CPDF_SampledFunc::v_Call
authorJUN FANG <jun_fang@foxitsoftware.com>
Sat, 31 Jan 2015 18:12:50 +0000 (10:12 -0800)
committerJUN FANG <jun_fang@foxitsoftware.com>
Sat, 31 Jan 2015 18:12:50 +0000 (10:12 -0800)
commit7dc63e6c53add27084929ffe52436b7bb6667a80
treecaa9d89124575dac34352a8ef1ce855f1f9dc088
parentdc8c95053b2872e9bd0fb96d618826ca70d84164
Fix heap buffer overflow in CPDF_SampledFunc::v_Call

This issue was caused by integer overflow in CPDF_SampledFunc::v_Call.
The root cause of this issue is that the content in the test pdf file
was damaged. The solution is to check whether an integer is overflow
before using it.

BUG=452455
R=tsepez@chromium.org

Review URL: https://codereview.chromium.org/886953002
core/src/fpdfapi/fpdf_page/fpdf_page_func.cpp