pfg 9fe5eca952 MFC r265095, r265167;
citrus: Avoid invalid code points.

The UTF-8 decoder should not accept byte sequences which decode to
unicode code positions U+D800 to U+DFFF (UTF-16 surrogates).[1]

Contrary to the original OpenBSD patch, we do pass U+FFFE and U+FFFF,
both values are valid "non-characters" [2] and must be mapped through
UTFs.

[1] http://www.cl.cam.ac.uk/~mgk25/unicode.html#utf-8
[2] http://www.unicode.org/faq/private_use.html

Reported by:	Stefan Sperling [1]
Thanks to:	jilles [2]
Obtained from:	OpenBSD
2014-05-05 14:50:53 +00:00
..
2013-05-21 19:59:37 +00:00
2013-05-21 19:59:37 +00:00
2013-05-04 17:06:47 +00:00
2012-07-30 21:02:44 +00:00
2013-05-21 19:59:37 +00:00
2013-05-21 19:59:37 +00:00
2013-05-21 19:59:37 +00:00
2013-05-04 17:06:47 +00:00
2013-05-03 12:42:43 +00:00
2013-05-21 19:59:37 +00:00
2013-05-04 17:06:47 +00:00
2014-05-05 14:50:53 +00:00
2013-05-21 19:59:37 +00:00
2013-05-21 19:59:37 +00:00
2013-05-04 17:06:47 +00:00