diff options
author | Jos-Vicente Gilabert <josevteg@gmail.com> | 2009-01-14 20:55:00 -0800 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@suse.de> | 2009-01-24 16:36:21 -0800 |
commit | 42e54f6093af41dbb7a9651cab819b05bb9cd808 (patch) | |
tree | f9dda3af4a820fa04fcafa0a0403d0787aca90a2 | |
parent | 36f0e0ab06053c9d10601bd8387b43ef5a91fb05 (diff) | |
download | lwn-42e54f6093af41dbb7a9651cab819b05bb9cd808.tar.gz lwn-42e54f6093af41dbb7a9651cab819b05bb9cd808.zip |
drivers/net/irda/irda-usb.c: fix buffer overflow
commit 2950e952920811be465ec95c6b56f03dc66a05c0 upstream.
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 <josevteg@gmail.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
-rw-r--r-- | drivers/net/irda/irda-usb.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/net/irda/irda-usb.c b/drivers/net/irda/irda-usb.c index b5d6b9ac162a..b4279785f60b 100644 --- a/drivers/net/irda/irda-usb.c +++ b/drivers/net/irda/irda-usb.c @@ -1075,7 +1075,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; |