CVE-2015-5330: next_codepoint_handle_ext: don't short-circuit UTF16 low bytes
authorDouglas Bagnall <douglas.bagnall@catalyst.net.nz>
Tue, 24 Nov 2015 00:54:09 +0000 (13:54 +1300)
committerRalph Boehme <slow@samba.org>
Wed, 9 Dec 2015 16:17:05 +0000 (17:17 +0100)
commitf07626d0297ed6bd21623409e1ea1ae1138d23a8
tree5223038772c68528433e8b89dfe3ec14053b1560
parenta561ae6294fa926bf3a15b9aaf3d18d25d5e971f
CVE-2015-5330: next_codepoint_handle_ext: don't short-circuit UTF16 low bytes

UTF16 contains zero bytes when it is encoding ASCII (for example), so we
can't assume the absense of the 0x80 bit means a one byte encoding. No
current callers use UTF16.

Bug: https://bugzilla.samba.org/show_bug.cgi?id=11599

Signed-off-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz>
Pair-programmed-with: Andrew Bartlett <abartlet@samba.org>
Reviewed-by: Ralph Boehme <slow@samba.org>
lib/util/charset/codepoints.c