]> git.kernelconcepts.de Git - karo-tx-linux.git/commit
USB: usb-storage: fix bug in fill_inquiry
authorAlan Stern <stern@rowland.harvard.edu>
Mon, 7 Dec 2009 21:47:43 +0000 (16:47 -0500)
committerGreg Kroah-Hartman <gregkh@suse.de>
Fri, 18 Dec 2009 21:43:12 +0000 (13:43 -0800)
commit9b6950a5e8986e97dd195070443f866035dfc5ef
treecd6112a13725b4363d105b7f0ff86534e195872c
parent944c010bcef4f0e4e5167121dab6b3a09c90ba87
USB: usb-storage: fix bug in fill_inquiry

commit f3f6faa9edf67c1018270793e0547b0f81abb47e upstream.

This patch (as1312) fixes a minor bug in usb-storage.  The
fill_inquiry() routine neglects to pre-load the inquiry data buffer
with spaces.  As a result, if the vendor name is shorter than 8
characters or the product name is shorter than 16, the remainder will
be filled with garbage.

The patch also removes some unnecessary calls to strlen().

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