summaryrefslogtreecommitdiffstats
path: root/drivers/input
diff options
context:
space:
mode:
authorDmitry Torokhov <dtor_core@ameritech.net>2005-05-28 02:12:00 -0500
committerDmitry Torokhov <dtor_core@ameritech.net>2005-05-28 02:12:00 -0500
commita07461ec0cffb105c7e7b7404520ea2c74129db0 (patch)
treeebb9131f3bc1ea645400e15e6d02e5b5acec49a2 /drivers/input
parentf24949e8e0b9bed223ad9a435bf37e91ee8d0db7 (diff)
downloadop-kernel-dev-a07461ec0cffb105c7e7b7404520ea2c74129db0.zip
op-kernel-dev-a07461ec0cffb105c7e7b7404520ea2c74129db0.tar.gz
Input: gunze - fix out-of-bound array access reported by Adrian Bunk.
Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
Diffstat (limited to 'drivers/input')
-rw-r--r--drivers/input/touchscreen/gunze.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/drivers/input/touchscreen/gunze.c b/drivers/input/touchscreen/gunze.c
index c9d0a15..53a27e4 100644
--- a/drivers/input/touchscreen/gunze.c
+++ b/drivers/input/touchscreen/gunze.c
@@ -68,8 +68,7 @@ static void gunze_process_packet(struct gunze* gunze, struct pt_regs *regs)
if (gunze->idx != GUNZE_MAX_LENGTH || gunze->data[5] != ',' ||
(gunze->data[0] != 'T' && gunze->data[0] != 'R')) {
- gunze->data[10] = 0;
- printk(KERN_WARNING "gunze.c: bad packet: >%s<\n", gunze->data);
+ printk(KERN_WARNING "gunze.c: bad packet: >%.*s<\n", GUNZE_MAX_LENGTH, gunze->data);
return;
}
OpenPOWER on IntegriCloud