linux/drivers/input
Jussi Kivilinna 9e68177ef9 Input: ff-memless - fix signed to unsigned bit overflow
When userspace sets effect->u.rumble.strong_magnitude to 0x8001 or
larger, ml_combine_effects() would always return strong_magnitude
0xffff.

Problem is that 'gain' is passed in as signed integer. Multiplying
magnitude (__u16) with gain (int) causes magnitude read as signed and
results negative value (with magnitude > 0x8000). This signed integer
is then divided and value, still negative, converted to 32bit unsigned
integer. Finally checking combine overflow min(new+old, 0xffff) gives
out 0xffff.

Fix is to simply change 'gain' to unsigned int.

Signed-off-by: Jussi Kivilinna <jussi.kivilinna@mbnet.fi>
Acked-by: Anssi Hannula <anssi.hannula@gmail.com>
Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
2009-05-07 19:04:16 -07:00
..
gameport Input: gameport - fix attach driver code 2009-04-15 08:58:19 -07:00
joystick sh: maple: Support block reads and writes. 2009-02-27 16:07:32 +09:00
keyboard Input: omap-keypad - use disable_irq_nosync() in irq handler 2009-04-17 20:41:44 -07:00
misc Input: hp_sdc_rtc should depend on serio 2009-04-15 08:58:19 -07:00
mouse Input: bcm5974 - augment debug information 2009-04-28 09:36:01 -07:00
serio Input: sa1111ps2 - use disable_irq_nosync() in irq handlers 2009-04-17 20:41:54 -07:00
tablet Input: wacom - fix TabletPC touch bug 2009-04-28 09:32:38 -07:00
touchscreen Input: ucb1400 - use disable_irq_nosync() in irq handler 2009-04-17 20:42:06 -07:00
apm-power.c Input: apm-power - fix crash when unloading modules 2008-03-24 11:02:06 -04:00
evbug.c Input: struct device - replace bus_id with dev_name(), dev_set_name() 2008-10-30 09:29:05 -04:00
evdev.c Rationalize fasync return values 2009-03-16 08:34:35 -06:00
ff-core.c drivers/input/ff-core.c needs <linux/sched.h> 2008-07-02 18:40:08 -07:00
ff-memless.c Input: ff-memless - fix signed to unsigned bit overflow 2009-05-07 19:04:16 -07:00
fixp-arith.h changed email 2007-10-20 00:47:32 +02:00
input-compat.c Input: refactor evdev 32bit compat to be shareable with uinput 2008-10-27 22:03:42 -04:00
input-compat.h Input: refactor evdev 32bit compat to be shareable with uinput 2008-10-27 22:03:42 -04:00
input-polldev.c Input: remove private member from input_dev structure 2008-04-02 00:41:00 -04:00
input.c Input: add detailed multi-touch finger data report protocol 2009-04-28 09:36:24 -07:00
joydev.c Input: joydev - blacklist digitizers 2009-05-07 19:04:03 -07:00
Kconfig trivial: fix typos/grammar errors in Kconfig texts 2009-03-30 15:22:01 +02:00
Makefile Input: refactor evdev 32bit compat to be shareable with uinput 2008-10-27 22:03:42 -04:00
mousedev.c Rationalize fasync return values 2009-03-16 08:34:35 -06:00
xen-kbdfront.c get xenbus_driver ->probe() "recognized" by modpost 2008-11-30 10:03:38 -08:00