diff options
author | Oleg Oshmyan <chortos@inbox.lv> | 2017-02-03 18:11:07 +0200 |
---|---|---|
committer | Oleg Oshmyan <chortos@inbox.lv> | 2020-10-18 05:01:31 +0300 |
commit | 815aae8308e177767ac9196bb60eb07fa588b392 (patch) | |
tree | 6aa0a53a90e250273dc766d1a7d41825473fcde9 /README.md | |
parent | 894e1d51cf252a3a38743b2828f190af17d0d31a (diff) | |
download | libass-815aae8308e177767ac9196bb60eb07fa588b392.tar.bz2 libass-815aae8308e177767ac9196bb60eb07fa588b392.tar.xz |
Fix mult_alpha of large argument
This function is passed alpha values from \fade, which are restricted
to nonnegative values but have no upper limit. Given a large value,
the subtraction and the multiply-divide could wrap around or even
overflow (in case of integer promotion to signed int). Overflow
is undesirable due to undefined behavior, and wraparound is also
undesirable due to VSFilter compatibility.
Rewrite the expression as a simpler equivalent that does not need to deal
with negative numbers and works correctly regardless of integer promotion.
Diffstat (limited to 'README.md')
0 files changed, 0 insertions, 0 deletions