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
..
2014-04-09 18:16:58 +00:00
2013-01-01 18:29:25 +00:00
2014-05-05 14:50:53 +00:00
2013-11-29 19:44:30 +00:00
2014-03-05 19:30:36 +00:00
2013-12-10 22:55:22 +00:00
2014-02-09 00:34:21 +00:00
2014-03-19 00:53:24 +00:00
2014-01-09 23:08:56 +00:00
2014-04-15 09:49:44 +00:00
2014-04-24 10:23:35 +00:00
2014-03-04 14:49:05 +00:00
2014-03-31 00:28:54 +00:00
2013-09-08 10:04:26 +00:00
2013-05-30 08:02:00 +00:00
2014-03-14 00:12:53 +00:00
2014-04-29 03:36:04 +00:00
2014-03-19 23:55:03 +00:00
2013-05-12 22:22:12 +00:00
2014-02-01 22:29:04 +00:00
2013-11-14 09:25:29 +00:00
2013-12-30 20:15:46 +00:00
2013-05-12 22:22:12 +00:00
2014-02-08 15:51:24 +00:00
2014-04-18 07:50:25 +00:00
2014-02-16 02:33:59 +00:00
2013-10-23 18:07:07 +00:00
2013-05-05 06:20:49 +00:00
2014-03-26 07:31:57 +00:00
2014-03-01 03:09:16 +00:00
2013-12-28 20:05:31 +00:00
2014-04-09 18:16:58 +00:00