Skip to content

Commit

Permalink
drivers/net/irda/irda-usb.c: fix buffer overflow
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Jos-Vicente Gilabert authored and David S. Miller committed Jan 15, 2009
1 parent 6f70340 commit 2950e95
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion drivers/net/irda/irda-usb.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit 2950e95

Please sign in to comment.