From owner-svn-src-all@freebsd.org Tue Aug 11 16:36:01 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 41B7C99E37D; Tue, 11 Aug 2015 16:36:01 +0000 (UTC) (envelope-from baptiste.daroussin@gmail.com) Received: from mail-wi0-x22c.google.com (mail-wi0-x22c.google.com [IPv6:2a00:1450:400c:c05::22c]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id C6DA42F8; Tue, 11 Aug 2015 16:36:00 +0000 (UTC) (envelope-from baptiste.daroussin@gmail.com) Received: by wicja10 with SMTP id ja10so75577970wic.1; Tue, 11 Aug 2015 09:35:59 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=sender:date:from:to:cc:subject:message-id:references:mime-version :content-type:content-disposition:in-reply-to:user-agent; bh=hO6hn8cyCuB4GGlw/xytRKOZq6eQddggppSp2TaO2+w=; b=q30tyvEW6D8HkOCRxV3hsjpmDwyDmQsDIy1S2O0RZTTd1OFYwpFU3x2D//tTr2eHN4 SOe2pU/d9gkmeF+5r4kRSjTH+jTVseXkDY3UvUGeA/HuT9qpIbPmZdKVT2knxnpO4ZfB YMhUZ0u86SiI3J4AogACT1ebrRcixbmQv1RW5nRp1BR3ukgk3v/5d3SY18jBxTTJygFy RI+U6C27TrRaU3pIeKg3ejLXEYKC3R4hl6khb0V0nLdLrFCfEZdoZRljUWBGZtLobkr0 kL+kL34G0A7dUEEIvKQYNN3Bm1vn65Y3RXwhENzfYtfohF7wYgZyBGKDrAEXfJnwHJCg 9a5g== X-Received: by 10.194.79.225 with SMTP id m1mr58201048wjx.8.1439310959170; Tue, 11 Aug 2015 09:35:59 -0700 (PDT) Received: from ivaldir.etoilebsd.net ([2001:41d0:8:db4c::1]) by smtp.gmail.com with ESMTPSA id du6sm12713805wib.24.2015.08.11.09.35.58 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 11 Aug 2015 09:35:58 -0700 (PDT) Sender: Baptiste Daroussin Date: Tue, 11 Aug 2015 18:35:56 +0200 From: Baptiste Daroussin To: Ed Schouten Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers Subject: Re: svn commit: r286490 - head/lib/libc/locale Message-ID: <20150811163554.GC10390@ivaldir.etoilebsd.net> References: <201508082359.t78NxGGZ026906@repo.freebsd.org> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="lkTb+7nhmha7W+c3" Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.23 (2014-03-12) X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 11 Aug 2015 16:36:01 -0000 --lkTb+7nhmha7W+c3 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Tue, Aug 11, 2015 at 06:27:01PM +0200, Ed Schouten wrote: > 2015-08-09 1:59 GMT+02:00 Baptiste Daroussin : > > Remove 5 and 6 bytes sequences which are illegal in UTF-8 space. > > > > Per rfc3629 value greater than 0x10ffff should be rejected >=20 > I think the change you made only ensures that the value cannot exceed > 0x1fffff -- not 0x10ffff. You probably need to do something like this: >=20 > diff --git a/lib/libc/locale/utf8.c b/lib/libc/locale/utf8.c > index 55e2931..8ccfdb1 100644 > --- a/lib/libc/locale/utf8.c > +++ b/lib/libc/locale/utf8.c > @@ -191,7 +191,7 @@ _UTF8_mbrtowc(wchar_t * __restrict pwc, const char > * __restrict s, size_t n, > errno =3D EILSEQ; > return ((size_t)-1); > } > - if (wch >=3D 0xd800 && wch <=3D 0xdfff) { > + if ((wch >=3D 0xd800 && wch <=3D 0xdfff) || wch > 0x10ffff) { > /* > * Malformed input; invalid code points. > */ Please go ahead with that one. Best regards, Bapt --lkTb+7nhmha7W+c3 Content-Type: application/pgp-signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v1 iEYEARECAAYFAlXKJGoACgkQ8kTtMUmk6Ex7CgCgqaMpjq7qo4B2tNT9ngBRP1Vy V3QAmgPlvaMiAiqQEH5ebnlxgkvIibWv =Bmjl -----END PGP SIGNATURE----- --lkTb+7nhmha7W+c3--