All of lore.kernel.org
 help / color / mirror / Atom feed
From: Dmitry Torokhov <dtor_core@ameritech.net>
To: Linus Torvalds <torvalds@osdl.org>
Cc: Vojtech Pavlik <vojtech@suse.cz>, Andrew Morton <akpm@osdl.org>,
	linux-kernel@vger.kernel.org
Subject: [patch 10/13] gunze: fix out-of-bound array access
Date: Sat, 28 May 2005 23:48:23 -0500	[thread overview]
Message-ID: <20050529045847.734671000.dtor_core@ameritech.net> (raw)
In-Reply-To: 20050529044813.711249000.dtor_core@ameritech.net

[-- Attachment #1: gunze-oob-access.patch --]
[-- Type: text/plain, Size: 802 bytes --]

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;
 	}
 


  parent reply	other threads:[~2005-05-29  5:03 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2005-05-29  4:48 [patch 00/13] Input patches for 2.6.12 Dmitry Torokhov
2005-05-29  4:48 ` [patch 01/13] Fix a warning in psmouse-base.c Dmitry Torokhov
2005-05-29  4:48 ` [patch 02/13] gameport: implement stubs to make OSS drivers buildable Dmitry Torokhov
2005-05-29  4:48 ` [patch 03/13] i8042: try AUX (on x86) even if PNP only reports KBD Dmitry Torokhov
2005-05-29  4:48 ` [patch 04/13] i8042: remove unused variable Dmitry Torokhov
2005-05-29  4:48 ` [patch 05/13] i8042: dont read CTR when resuming Dmitry Torokhov
2005-05-29  4:48 ` [patch 06/13] i8042: tone down warning when PNP insists that KBC is missing Dmitry Torokhov
2005-05-29  4:48 ` [patch 07/13] i8042: Make sure we unregister PNP driver only once Dmitry Torokhov
2005-05-29  4:48 ` [patch 08/13] psmouse: workaround for Sunrex mouse Dmitry Torokhov
2005-05-29  4:48 ` [patch 09/13] joydev: fix button mapping Dmitry Torokhov
2005-05-29  4:48 ` Dmitry Torokhov [this message]
2005-05-29  4:48 ` [patch 11/13] i8042: dont activate MUX mode on Toshiba Satellite P10 Dmitry Torokhov
2005-05-29  4:48 ` [patch 12/13] i8042: dont activate MUX mode on Fujitsu Lifebook S6230 Dmitry Torokhov
2005-05-29  4:48 ` [patch 13/13] synaptics: be less verbose on startup Dmitry Torokhov
2005-05-29  7:37 ` [patch 14/13] Fix broken mapping for right "win" key Dmitry Torokhov
2005-05-29  7:51 ` [patch 00/13] Input patches for 2.6.12 Vojtech Pavlik

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20050529045847.734671000.dtor_core@ameritech.net \
    --to=dtor_core@ameritech.net \
    --cc=akpm@osdl.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=torvalds@osdl.org \
    --cc=vojtech@suse.cz \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.