USB: Gadget: fix UTF conversion in the usbstring library
authorAlan Stern <stern@rowland.harvard.edu>
Mon, 27 Apr 2009 17:22:40 +0000 (13:22 -0400)
committerGreg Kroah-Hartman <gregkh@suse.de>
Sat, 9 May 2009 02:34:56 +0000 (19:34 -0700)
commit0f43158caddcbb110916212ebe4e39993ae70864
tree8abb9161fedf231180ffa2828010670d51a25357
parent72a772a9a3da47e1cdbe01c4aa1105aa8badfff2
USB: Gadget: fix UTF conversion in the usbstring library

This patch (as1234) fixes a bug in the UTF8 -> UTF-16 conversion
routine in the gadget/usbstring library.  In a UTF-8 multi-byte
sequence, all bytes after the first should have their high-order
two bits set to 10, not 11.

Signed-off-by: Alan Stern <stern@rowland.harvard.edu>
Acked-by: David Brownell <dbrownell@users.sourceforge.net>
Cc: stable <stable@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
drivers/usb/gadget/usbstring.c