]> git.baikalelectronics.ru Git - kernel.git/commit
USB: usb-storage: don't access beyond the end of the sg buffer
authorAlan Stern <stern@rowland.harvard.edu>
Wed, 20 Feb 2008 19:15:58 +0000 (14:15 -0500)
committerGreg Kroah-Hartman <gregkh@suse.de>
Thu, 21 Feb 2008 23:38:55 +0000 (15:38 -0800)
commit91366d928cad6367abfe419c3833aa9b93cdf55d
tree6cb1288a50aa1977c48e9e32d7d61cf2204ac350
parent03779c7ca03e65972ed28b865c4d48134f7a4afe
USB: usb-storage: don't access beyond the end of the sg buffer

This patch (as1035) fixes a bug in usb_stor_access_xfer_buf() (the bug
was originally found by Boaz Harrosh): The routine must not attempt to
write beyond the end of a scatter-gather list or beyond the number of
bytes requested.  It also fixes up the formatting of a few comments
and similar whitespace issues.

Signed-off-by: Alan Stern <stern@rowland.harvard.edu>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
drivers/usb/storage/protocol.c