diff options
author | kcwu <kcwu@chromium.org> | 2016-10-17 06:13:11 -0700 |
---|---|---|
committer | Commit bot <commit-bot@chromium.org> | 2016-10-17 06:13:11 -0700 |
commit | 85fcf94eeae589641213c4301bbb16b44b10a282 (patch) | |
tree | b29673f448464f6bf5803e06e2c40aed97989b8e /BUILD.gn | |
parent | 05923132ae08d45fbe957219775a48c55ee57aef (diff) | |
download | pdfium-85fcf94eeae589641213c4301bbb16b44b10a282.tar.xz |
lcms: reject NaN when reading float numbers
LerpFloat functions expect input values are normal float. They first
clamp values to the range of [0.0, 1.0] and then calculate interpolation
with the input values.
If the input value is NaN, it will lead to heap buffer overflow because
the index to LutTable is calculated based on the said value and
fclamp(NaN) is not in expected [0.0, 1.0] range.
This patch rejects all NaN values earlier when reading float numbers. So
it also changed behavior for cases other than LerpFloat. I think it is
okay because NaN doesn't make sense for usual calculations.
BUG=654676
Review-Url: https://codereview.chromium.org/2422553002
Diffstat (limited to 'BUILD.gn')
0 files changed, 0 insertions, 0 deletions