From a21466cc77b25dc2afd1292c79c7fc8fd454a1a7 Mon Sep 17 00:00:00 2001 From: Dmitry Torokhov Date: Mon, 26 Jun 2006 01:46:04 -0400 Subject: Input: fix potential overflows in driver/input/touchscreen Change all sprintfs into snprintfs to make sure we won't stomp on data adjacent to our buffers. Signed-off-by: Dmitry Torokhov --- drivers/input/touchscreen/mtouch.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'drivers/input/touchscreen/mtouch.c') diff --git a/drivers/input/touchscreen/mtouch.c b/drivers/input/touchscreen/mtouch.c index 1d0d37eeef6e..8647a905df80 100644 --- a/drivers/input/touchscreen/mtouch.c +++ b/drivers/input/touchscreen/mtouch.c @@ -143,7 +143,7 @@ static int mtouch_connect(struct serio *serio, struct serio_driver *drv) mtouch->serio = serio; mtouch->dev = input_dev; - sprintf(mtouch->phys, "%s/input0", serio->phys); + snprintf(mtouch->phys, sizeof(mtouch->phys), "%s/input0", serio->phys); input_dev->private = mtouch; input_dev->name = "MicroTouch Serial TouchScreen"; -- cgit v1.2.3