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:19:53 +0000 (17:19 +0100)
commit538d305de91e34a2938f5f219f18bf0e1918763f
tree666e3d8310f98648a183edc5a08494750a3781c2
parenta118d4220ed85749c07fb43c1229d9e2fecbea6b
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