Date: Sat, 8 Aug 2015 23:59:16 +0000 (UTC) From: Baptiste Daroussin <bapt@FreeBSD.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r286490 - head/lib/libc/locale Message-ID: <201508082359.t78NxGGZ026906@repo.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: bapt Date: Sat Aug 8 23:59:15 2015 New Revision: 286490 URL: https://svnweb.freebsd.org/changeset/base/286490 Log: Remove 5 and 6 bytes sequences which are illegal in UTF-8 space. Per rfc3629 value greater than 0x10ffff should be rejected Suggested by: jilles Modified: head/lib/libc/locale/utf8.c Modified: head/lib/libc/locale/utf8.c ============================================================================== --- head/lib/libc/locale/utf8.c Sat Aug 8 23:26:11 2015 (r286489) +++ head/lib/libc/locale/utf8.c Sat Aug 8 23:59:15 2015 (r286490) @@ -145,14 +145,6 @@ _UTF8_mbrtowc(wchar_t * __restrict pwc, mask = 0x07; want = 4; lbound = 0x10000; - } else if ((ch & 0xfc) == 0xf8) { - mask = 0x03; - want = 5; - lbound = 0x200000; - } else if ((ch & 0xfe) == 0xfc) { - mask = 0x01; - want = 6; - lbound = 0x4000000; } else { /* * Malformed input; input is not UTF-8.
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201508082359.t78NxGGZ026906>