From owner-svn-src-head@FreeBSD.ORG Thu May 1 02:38:55 2014 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 9E3F8925 for ; Thu, 1 May 2014 02:38:55 +0000 (UTC) Received: from nm48-vm4.bullet.mail.bf1.yahoo.com (nm48-vm4.bullet.mail.bf1.yahoo.com [216.109.115.159]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 252B814F4 for ; Thu, 1 May 2014 02:38:55 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yahoo.com; s=s2048; t=1398911597; bh=cxup5NhuXXpItLs3jdtSMWgh2smEM0/MzzbPvrTOQeQ=; h=Received:Received:Received:X-Yahoo-Newman-Id:X-Yahoo-Newman-Property:X-YMail-OSG:X-Yahoo-SMTP:X-Rocket-Received:Message-ID:Date:From:User-Agent:MIME-Version:To:Subject:References:In-Reply-To:Content-Type:Content-Transfer-Encoding; b=LYIfXyiYfHvBH58ZFJaq3q+4XD3agQskORXRNNQRMN2uyrkhCigoiuTtDl9Ql7AEbu/q2rPQ3JaV04tl9b/YIGESO3AVueqGczTCPbth+ot6nEcp3bNfjWDY1Fx6tGjgy38FfTjzFg4luKu0Bb80hM5Cmmjn6tVMUB5yNyW/Uf9sRoB7ZuoG4x6VsG3Wxs73s50cSIiiiGDbaphLJOa5brAIxLei/pe0M//rQapVW7w4nJGx04byeWw3vnUuQV5cjX3CGqZxm+67tXTFPBXcBqvAfVD4vduJ+53qh1B7vYxXVb36Av0Kuw8i6I+QOQzQR0kTkNVxiDVJ+ZQ5iF4YYg== DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=s2048; d=yahoo.com; b=XIABrPsBd7L2iPEzK8zRvzjbilBFJR65QKAPVibJyvTQL7fmTSYo8JbPiOY28BsMbJRa1qLXDh7v2lDwfrmtz9zRveZxI7NUgTZ7MDUiBlcyCILgHSo32cpQO6O3ov8fx7mT28mNTI6JeNzP6mFIbeCMfcgrSqC30ty6yiSiLqruQ48q4ILMlsHKNRqOenVWNVZlyeRH9LKgeFI3akWu8kjayNvod75DL/CxLhTzvyOBayXzD3ykO7rz9VUrSftmIvJgAxeMaf2uPkk0YcwRzwGWDntPyMf3t/n/72BJCQq0mrtYTlEVg+BuV4RiId/7ORfre3hlTBaLUsljErQ3Sg==; Received: from [66.196.81.173] by nm48.bullet.mail.bf1.yahoo.com with NNFMP; 01 May 2014 02:33:17 -0000 Received: from [98.139.211.160] by tm19.bullet.mail.bf1.yahoo.com with NNFMP; 01 May 2014 02:33:17 -0000 Received: from [127.0.0.1] by smtp217.mail.bf1.yahoo.com with NNFMP; 01 May 2014 02:33:17 -0000 X-Yahoo-Newman-Id: 841877.63910.bm@smtp217.mail.bf1.yahoo.com X-Yahoo-Newman-Property: ymail-3 X-YMail-OSG: GdZAKPgVM1nABkro4LxzJJlE6CSuPnL4395OrfsiWJb1NwV 6sTM5Y4VHSqBHV8tneMMs_6qtfKgJv2vhQl3Km4bJSikYkcqMLoC1tvoh83V 1qe8Lubsy1ielkOL5jX3y9GWY28H4ZeZO4CQJNEFLQ653H.vIgY46td6vTxS UgYWytq6qzOY4QFPD8KKnubfaGRBx9eWFHT1J9WGnRlHlNCyY6qC5uq0RLrH 2YY8pdbBAjmmJAK08vMWB5sDevFMLWcutytJqaGqXfWPXdk3bsmPk5xMYe4A IZoilzoEHzYFD4Jne8sOY3.sPOtLO61RU2qV2a7SUCiyQJzv5OZpRIDzsf7u 3UdOIo9VR6J1xN5_mc4IlO0Miblp7OXz7NEQerW_I8i.JqKqJkXyZ9RJm.Tr OPpRD8E9OSX.F1Sm8JlLadd4j4qjVbulq0amHKLMijPBPnTaRczI4x_Qh7Tv NJM3zxuyR2agTrR7RM2yhBf95kcfzTVZAita4Fz80fXeB1TMCnf6FvcvVWka TB1ynjL91im9VG1W.xn9ogzNCowF7p52elV9O0VpnKNAfYAgEbTbRkq6AR_x mFOfN_yr5DUtGOzu2NqKKwCrefiqPHbzGBskv9HKSua86crE1eHt41vEEvI0 wVwabASUM9gaumzW7dIjoQpx4iLZdKrUT44YIQqLLhFHmWayLq7GWBqwxmwQ 2Hl2w65VpXW.jJMf5a2rgTZ5SUmx0M39xEgddDtv7AywEigUnxJ8rPmAuA_Y IScYcMld_cnDIN6LIgQ-- X-Yahoo-SMTP: xcjD0guswBAZaPPIbxpWwLcp9Unf X-Rocket-Received: from [192.168.0.102] (pfg@190.157.126.109 with plain [63.250.193.228]) by smtp217.mail.bf1.yahoo.com with SMTP; 30 Apr 2014 19:33:17 -0700 PDT Message-ID: <5361B270.7020609@freebsd.org> Date: Wed, 30 Apr 2014 21:33:20 -0500 From: Pedro Giffuni User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:24.0) Gecko/20100101 Thunderbird/24.4.0 MIME-Version: 1.0 To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org, jilles@freebsd.org Subject: Re: svn commit: r265167 - head/lib/libc/locale References: <201405010142.s411gm8F068251@svn.freebsd.org> In-Reply-To: <201405010142.s411gm8F068251@svn.freebsd.org> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 01 May 2014 02:38:55 -0000 Oops.. wrong log!! Should've been this: _____________ citrus: pass U+FFFE and U+FFFF normally. r265095, based on an OpenBSD change was rejecting U+FFFE and U+FFFF in accordance with outdated documentation. Both values are valid "non-characters" [1] and must be mapped through UTFs. Reference: http://www.unicode.org/faq/private_use.html [1] Reported by: jilles MFC after: 4 days _____________ I will fix it for the MFC. Pedro. On 04/30/14 20:42, Pedro F. Giffuni wrote: > Author: pfg > Date: Thu May 1 01:42:48 2014 > New Revision: 265167 > URL: http://svnweb.freebsd.org/changeset/base/265167 > > Log: > citrus: Avoid invalid code points. > > From the OpenBSD log: > The UTF-8 decoder should not accept byte sequences which decode to unicode > code positions U+D800 to U+DFFF (UTF-16 surrogates), U+FFFE, and U+FFFF. > > http://www.cl.cam.ac.uk/~mgk25/unicode.html#utf-8 > http://unicode.org/faq/utf_bom.html#utf8-4 > > Reported by: Stefan Sperling > Obtained from: OpenBSD > MFC after: 5 days > > Modified: > head/lib/libc/locale/utf8.c > > Modified: head/lib/libc/locale/utf8.c > ============================================================================== > --- head/lib/libc/locale/utf8.c Thu May 1 00:31:19 2014 (r265166) > +++ head/lib/libc/locale/utf8.c Thu May 1 01:42:48 2014 (r265167) > @@ -203,8 +203,7 @@ _UTF8_mbrtowc(wchar_t * __restrict pwc, > errno = EILSEQ; > return ((size_t)-1); > } > - if ((wch >= 0xd800 && wch <= 0xdfff) || > - wch == 0xfffe || wch == 0xffff) { > + if (wch >= 0xd800 && wch <= 0xdfff) { > /* > * Malformed input; invalid code points. > */ >