diff options
| author | Jason Andryuk <jandryuk@gmail.com> | 2016-02-12 23:13:33 +0000 |
|---|---|---|
| committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2016-03-16 08:42:21 -0700 |
| commit | e90f4779cbca934940a4c4e67c96fdf314c291c8 (patch) | |
| tree | 9a5aa55a172a9d8090cf890ac4e3f2f677a4b9ec /kernel | |
| parent | fb7ef72dcf235ffeb3b3316c5b844fa035d45683 (diff) | |
| download | linux-e90f4779cbca934940a4c4e67c96fdf314c291c8.tar.gz linux-e90f4779cbca934940a4c4e67c96fdf314c291c8.tar.bz2 linux-e90f4779cbca934940a4c4e67c96fdf314c291c8.zip | |
lib/ucs2_string: Correct ucs2 -> utf8 conversion
commit a68075908a37850918ad96b056acc9ac4ce1bd90 upstream.
The comparisons should be >= since 0x800 and 0x80 require an additional bit
to store.
For the 3 byte case, the existing shift would drop off 2 more bits than
intended.
For the 2 byte case, there should be 5 bits bits in byte 1, and 6 bits in
byte 2.
Signed-off-by: Jason Andryuk <jandryuk@gmail.com>
Reviewed-by: Laszlo Ersek <lersek@redhat.com>
Cc: Peter Jones <pjones@redhat.com>
Cc: Matthew Garrett <mjg59@coreos.com>
Cc: "Lee, Chun-Yi" <jlee@suse.com>
Signed-off-by: Matt Fleming <matt@codeblueprint.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'kernel')
0 files changed, 0 insertions, 0 deletions
