]> git.baikalelectronics.ru Git - kernel.git/commit
[PATCH] hid-core: Zero-pad truncated reports
authorAdam Kropelin <akropel1@rochester.rr.com>
Wed, 14 Dec 2005 01:03:39 +0000 (17:03 -0800)
committerLinus Torvalds <torvalds@g5.osdl.org>
Wed, 14 Dec 2005 05:18:16 +0000 (21:18 -0800)
commita2a7425c54c63019511b7f05a4089bb1c2511eee
treecca09c779e83341507b21c132b3ffe090110602e
parent0d09781881d96f7d6e79181dfe223ba571318180
[PATCH] hid-core: Zero-pad truncated reports

When it detects a truncated report, hid-core emits a warning and then
processes the report as usual.  This is good because it allows buggy
devices to still get data thru to userspace.  However, the missing bytes of
the report should be cleared before processing, otherwise userspace will be
handed partially-uninitialized data.

This fixes Debian tracker bug #330487.

Signed-off-by: Adam Kropelin <akropel1@rochester.rr.com>
Cc: Vojtech Pavlik <vojtech@suse.cz>
Acked-by: Dmitry Torokhov <dtor_core@ameritech.net>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
drivers/usb/input/hid-core.c