diff options
author | Nikita Zhandarovich <n.zhandarovich@fintech.ru> | 2025-01-16 05:48:01 -0800 |
---|---|---|
committer | Alex Lanzano <lanzano.alex@gmail.com> | 2025-02-24 19:43:23 -0500 |
commit | 4d098000ac193f359e6b8ca4801dbdbd6a27b41f (patch) | |
tree | fdeb986599a163349c198ffb9fa5eda2c89963f0 /tools/perf/scripts/python/export-to-postgresql.py | |
parent | ed531feda7852de0aa702fbe3d23a0f743ccc77b (diff) |
drm/repaper: fix integer overflows in repeat functions
There are conditions, albeit somewhat unlikely, under which right hand
expressions, calculating the end of time period in functions like
repaper_frame_fixed_repeat(), may overflow.
For instance, if 'factor10x' in repaper_get_temperature() is high
enough (170), as is 'epd->stage_time' in repaper_probe(), then the
resulting value of 'end' will not fit in unsigned int expression.
Mitigate this by casting 'epd->factored_stage_time' to wider type before
any multiplication is done.
Found by Linux Verification Center (linuxtesting.org) with static
analysis tool SVACE.
Fixes: 3589211e9b03 ("drm/tinydrm: Add RePaper e-ink driver")
Cc: stable@vger.kernel.org
Signed-off-by: Nikita Zhandarovich <n.zhandarovich@fintech.ru>
Signed-off-by: Alex Lanzano <lanzano.alex@gmail.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20250116134801.22067-1-n.zhandarovich@fintech.ru
Diffstat (limited to 'tools/perf/scripts/python/export-to-postgresql.py')
0 files changed, 0 insertions, 0 deletions