lkml.org 
[lkml]   [2005]   [May]   [29]   [last100]   RSS Feed
Views: [more markup]  [less markup]  [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
DateSat, 28 May 2005 23:48:23 -0500
FromDmitry Torokhov <>
Subject[patch 10/13] gunze: fix out-of-bound array access
Input: gunze - fix out-of-bound array access reported by Adrian Bunk.

Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
---
 drivers/input/touchscreen/gunze.c |    3 +--
 1 files changed, 1 insertion(+), 2 deletions(-)
Index: work/drivers/input/touchscreen/gunze.c
===================================================================
--- work.orig/drivers/input/touchscreen/gunze.c
+++ work/drivers/input/touchscreen/gunze.c
@@ -68,8 +68,7 @@ static void gunze_process_packet(struct 
 
 	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;
 	}
 
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

\
 
 \ /
  Last update: 2005-05-29 07:24    [from the cache]
©2003-2008