]> git.baikalelectronics.ru Git - kernel.git/commit
isight_firmware: Avoid crash on loading invalid firmware
authorMatthew Garrett <mjg59@srcf.ucam.org>
Fri, 6 Jun 2008 19:35:15 +0000 (12:35 -0700)
committerGreg Kroah-Hartman <gregkh@suse.de>
Thu, 12 Jun 2008 00:06:33 +0000 (17:06 -0700)
commitd44bf9e3a5e3e86e1fbea682d912af599041d087
treee0aa7d2f40ef390403bfc7258199fe7b7cca399b
parent80eb491c77a284bab4ce8d52661ce40c278864cd
isight_firmware: Avoid crash on loading invalid firmware

Different tools generate slightly different formats of the isight
firmware. Ensure that the firmware buffer is not overrun, while still
ensuring that the correct amount of data is written if trailing data is
present.

Signed-off-by: Matthew Garrett <mjg@redhat.com>
Report-by: Justin Mattock <justinmattock@gmail.com>
Tested-by: Justin Mattock <justinmattock@gmail.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
drivers/usb/misc/isight_firmware.c