From: Jos-Vicente Gilabert Date: Thu, 15 Jan 2009 04:55:00 +0000 (-0800) Subject: drivers/net/irda/irda-usb.c: fix buffer overflow X-Git-Tag: v2.6.29-rc2~2^2~28 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=2950e952920811be465ec95c6b56f03dc66a05c0;p=platform%2Fkernel%2Flinux-exynos.git drivers/net/irda/irda-usb.c: fix buffer overflow Taken from http://bugzilla.kernel.org/show_bug.cgi?id=12397 We're doing an sprintf of an 11-char string into an 11-char buffer. Whoops. It breaks firmware uploading. Reported-by: Jos-Vicente Gilabert Signed-off-by: Andrew Morton Signed-off-by: David S. Miller --- diff --git a/drivers/net/irda/irda-usb.c b/drivers/net/irda/irda-usb.c index 29118f5..3a22dc4 100644 --- a/drivers/net/irda/irda-usb.c +++ b/drivers/net/irda/irda-usb.c @@ -1073,7 +1073,7 @@ static int stir421x_patch_device(struct irda_usb_cb *self) { unsigned int i; int ret; - char stir421x_fw_name[11]; + char stir421x_fw_name[12]; const struct firmware *fw; const unsigned char *fw_version_ptr; /* pointer to version string */ unsigned long fw_version = 0;