summaryrefslogtreecommitdiff
path: root/drivers/gpu
diff options
context:
space:
mode:
authorTomasz Pakuła <tomasz.pakula.oficjalny@gmail.com>2026-05-10 15:23:52 +0300
committerJiri Kosina <jkosina@suse.com>2026-05-12 19:13:40 +0300
commit48d1677779ad6816978ad4a4f7588aec5ec960fe (patch)
treed37cd01da4a5772bb3d1fc27a1de205d6074db73 /drivers/gpu
parenta991aa5e89365ba1959fae6847fd288125b209e5 (diff)
downloadlinux-48d1677779ad6816978ad4a4f7588aec5ec960fe.tar.xz
HID: pidff: Fix integer overflow in pidff_rescale
Rescaling values close to the max (U16_MAX) temporarily creates values that exceed the s32 range. This caused value overflow in case when, for example, a periodic effect phase was higer than 180 degrees. In turn, rescale function could return values outised of the logical range of the HID field. Fix by using 64 bit signed integer to store the value during calculation but still return only 32 bit integer. Closes: https://github.com/JacKeTUs/universal-pidff/issues/116 Fixes: 224ee88fe395 ("Input: add force feedback driver for PID devices") Cc: stable@vger.kernel.org Signed-off-by: Tomasz Pakuła <tomasz.pakula.oficjalny@gmail.com> Signed-off-by: Jiri Kosina <jkosina@suse.com>
Diffstat (limited to 'drivers/gpu')
0 files changed, 0 insertions, 0 deletions