Message ID | 20230621185820.1766291-1-ben.boeckel@kitware.com |
---|---|
State | Unresolved |
Headers |
Return-Path: <gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org> Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:994d:0:b0:3d9:f83d:47d9 with SMTP id k13csp4575740vqr; Wed, 21 Jun 2023 11:59:24 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ6wnyZlIbbmqgFBljSOKiCvqzFHPbKZWfxVZ+naNWf34jdPYQB4MYld4qjNhtDUEic52C2Q X-Received: by 2002:a17:906:d54f:b0:988:a632:774a with SMTP id cr15-20020a170906d54f00b00988a632774amr10159372ejc.27.1687373963801; Wed, 21 Jun 2023 11:59:23 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1687373963; cv=none; d=google.com; s=arc-20160816; b=RUPB4zOoy1TU2QbswVBJIsTtMcv1+xxXwtVvp4qslh9qROcuP77w5mRxKRkkVKyMy4 kkJsHU8DSUFnDj/KcNPQDvej3RCu8UKJsI/jeOtDldqJOJQsBz5jhGcyIlxPYa1meDy2 t1D0b8HGm9fvnIh6Ktg2RuVYKn953zb2ywkJwi0KdFir0N2nXaFSqsPeGap4mI28tqND 8d/qAcl1fymu+TMMwD92wT9l54P28UnoE5xQ0rEFbbVVI3iq/VFA/FnQQw5l9NiHMazh W5PA10L5wnR2+1TXAeHmsEDASoYYcfhI+h/f/bDOASvR3LcK5gWM4XYHvqtZPl2p23zz M8jg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:content-transfer-encoding :mime-version:message-id:date:subject:cc:to:from:feedback-id :dkim-signature:dkim-signature:dmarc-filter:delivered-to; bh=D6EBcLMFg9sbGFBnVIKuUNHLvatgo38arlWe97Du9Wg=; b=HTadthpw41Uk1kaQXItxTZoLpr+6dGujVhmhfUbavqnrPKypi6Sn7JzbmEqTTnmLL6 BjvkctCSo3iPU9T5+90AjNrV3+a/9XF2t/b2WrUnn/mb5mZnolecdrkybFoBcTjJkVyr 2Ct8LlmKBZ3fRtUMtfSVkTi2a06N4ISsVrZ+0/9I/qVSGPNsng2cMcvr/sqfX8I4gtkt oVbtZeAV2M1AKKQK7Tff/n/mauTboIML0eJjYwjczIxZCwh09h5aLUbALIm1vzTpkuUG Gf3aNsQrMll+obGjycTyuYkZOeqvdgIe19gwq+UhLvLcu9BYGnkUXTg8rzcuvI3K5C/6 ou7g== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@benboeckel.net header.s=fm3 header.b=mdSTUhkm; dkim=fail header.i=@messagingengine.com header.s=fm2 header.b="A/ScTcwN"; spf=pass (google.com: domain of gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org designates 2620:52:3:1:0:246e:9693:128c as permitted sender) smtp.mailfrom="gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org" Received: from sourceware.org (server2.sourceware.org. [2620:52:3:1:0:246e:9693:128c]) by mx.google.com with ESMTPS id ca1-20020a170906a3c100b00983e2067c15si2544469ejb.449.2023.06.21.11.59.23 for <ouuuleilei@gmail.com> (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 21 Jun 2023 11:59:23 -0700 (PDT) Received-SPF: pass (google.com: domain of gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org designates 2620:52:3:1:0:246e:9693:128c as permitted sender) client-ip=2620:52:3:1:0:246e:9693:128c; Authentication-Results: mx.google.com; dkim=fail header.i=@benboeckel.net header.s=fm3 header.b=mdSTUhkm; dkim=fail header.i=@messagingengine.com header.s=fm2 header.b="A/ScTcwN"; spf=pass (google.com: domain of gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org designates 2620:52:3:1:0:246e:9693:128c as permitted sender) smtp.mailfrom="gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org" Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id 54264385841A for <ouuuleilei@gmail.com>; Wed, 21 Jun 2023 18:58:52 +0000 (GMT) X-Original-To: gcc-patches@gcc.gnu.org Delivered-To: gcc-patches@gcc.gnu.org Received: from out2-smtp.messagingengine.com (out2-smtp.messagingengine.com [66.111.4.26]) by sourceware.org (Postfix) with ESMTPS id CE9123858D28; Wed, 21 Jun 2023 18:58:26 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org CE9123858D28 Authentication-Results: sourceware.org; dmarc=none (p=none dis=none) header.from=benboeckel.net Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=benboeckel.net Received: from compute4.internal (compute4.nyi.internal [10.202.2.44]) by mailout.nyi.internal (Postfix) with ESMTP id F1C2A5C0195; Wed, 21 Jun 2023 14:58:24 -0400 (EDT) Received: from mailfrontend2 ([10.202.2.163]) by compute4.internal (MEProxy); Wed, 21 Jun 2023 14:58:24 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=benboeckel.net; h=cc:cc:content-transfer-encoding:content-type:date:date:from :from:in-reply-to:message-id:mime-version:reply-to:sender :subject:subject:to:to; s=fm3; t=1687373904; x=1687460304; bh=D6 EBcLMFg9sbGFBnVIKuUNHLvatgo38arlWe97Du9Wg=; b=mdSTUhkmxRqIGZVe18 Lwwy59ojz/lfYt1NGdU/oAU3vXNkxJE07TcM7PdfScDORPJ++prcssk8a0Qtvbcl XWHwguO+flRsn2ifdfTbAEdK1RFLnCoEGs61W5jssw16ElLrRZ7ei/k5woanwkon kxr8MpupAdzdmOjToPhV+Li4mfvVJa0rnJBnCtbNxuZ2tvAa3lP/umeoH5J7b9UJ cO2d+l3MQ81VQYa19QNhl5QUlSDpiS8NWqrJVpX2Q1afsI/3yUXDoOMn2VS2jHT/ QbLU6/vpCZbdI7bSlo2UyM7kAOMMqk8GRfkiNN7OkqFHD655jUUhTLFdk/38PzXQ vYhg== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:cc:content-transfer-encoding :content-type:date:date:feedback-id:feedback-id:from:from :in-reply-to:message-id:mime-version:reply-to:sender:subject :subject:to:to:x-me-proxy:x-me-proxy:x-me-sender:x-me-sender :x-sasl-enc; s=fm2; t=1687373904; x=1687460304; bh=D6EBcLMFg9sbG FBnVIKuUNHLvatgo38arlWe97Du9Wg=; b=A/ScTcwNzSeMolLiMjVCfRFG8A/or ZzBdVIlOyZPJjxvLqF+AYv992YaBEN7cRen2I/IqRQB1+Y8QboMhbYz9pwJOxbZi EfPA+lD0keu57UYnOzYjA+KJz9KCl1xa1BWViZGSGibV2wez165SSDMOU+sMQV6r txpkQHg0HDrHevpq5Cjv6AncQZey4kyUBc6bH66y0YhGGiV35eqOSJUshTa1J2Kd UHiaaq1OzpdpmCDBS2aP9savkmj68Yxob6QOI/Y2FGgi9OkIZbGhwaBT4FTkw4Dl OUGOwFe3GDfkKOqck4PwSRbXGw3NNzdpjl95uv0Enxx9RYPB2NdP9HaOg== X-ME-Sender: <xms:UEiTZNdqj4daWx_jfuLahYWo-AExhTYNeClm3Y7gVO1jSyc2jJi8Uw> <xme:UEiTZLPDN8pjtJdfIFBHiziGE3y3TRZ9l1hLQjoAzn-orH-3rsp3NCL_Ynl1zHdXf pm3MiuwO4rt60Kcekk> X-ME-Received: <xmr:UEiTZGh99c0_47aw59R0igDV2LYYdb7x4ssGMlrZrwPeN21IaniS-_HC3_8AvWy5I4OpBMkFk5V9AMh804bcGdN9ACov0NuaRq-8> X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvhedrgeefledgfeegucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfqfgfvpdfurfetoffkrfgpnffqhgen uceurghilhhouhhtmecufedttdenucesvcftvggtihhpihgvnhhtshculddquddttddmne cujfgurhephffvvefufffkofgggfestdekredtredttdenucfhrhhomhepuegvnhcuueho vggtkhgvlhcuoehmvgessggvnhgsohgvtghkvghlrdhnvghtqeenucggtffrrghtthgvrh hnpeffleetleelleefjeefveetgefffeehgefhjeeffedtteehuedujeffjeekhefgfeen ucevlhhushhtvghrufhiiigvpedtnecurfgrrhgrmhepmhgrihhlfhhrohhmpehmvgessg gvnhgsohgvtghkvghlrdhnvght X-ME-Proxy: <xmx:UEiTZG9B9VAjNpe4_Jkf5mGZIznsFnNVZegovFOL1axjrzVsuQ6yLw> <xmx:UEiTZJtazqGOsR5FAeqBFb98hUg4GH_UDUPPCKffsGBYUEqYkIRtzg> <xmx:UEiTZFFyDry68Fu892Zv7AGPcTGchhWb-i8jjK861qDFUMuB1TkobA> <xmx:UEiTZDLwo-iqZlf1t6tKVIfnSjMDoOCTQZDGsT_xTNjMYNhFWD4nCg> Feedback-ID: iffc1478b:Fastmail Received: by mail.messagingengine.com (Postfix) with ESMTPA; Wed, 21 Jun 2023 14:58:24 -0400 (EDT) From: Ben Boeckel <me@benboeckel.net> To: gcc-patches@gcc.gnu.org Cc: Ben Boeckel <ben.boeckel@kitware.com>, jason@redhat.com, gcc@gcc.gnu.org, brad.king@kitware.com, Damien Guibouret <damien.guibouret@partition-saving.com> Subject: [PATCH 1/1] libcpp: allow UCS_LIMIT codepoints in UTF-8 strings Date: Wed, 21 Jun 2023 14:58:20 -0400 Message-Id: <20230621185820.1766291-1-ben.boeckel@kitware.com> X-Mailer: git-send-email 2.40.1 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-11.9 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, GIT_PATCH_0, JMQ_SPF_NEUTRAL, RCVD_IN_DNSWL_LOW, RCVD_IN_MSPIKE_H3, RCVD_IN_MSPIKE_WL, SPF_HELO_PASS, SPF_PASS, TXREP, T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on server2.sourceware.org X-BeenThere: gcc-patches@gcc.gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Gcc-patches mailing list <gcc-patches.gcc.gnu.org> List-Unsubscribe: <https://gcc.gnu.org/mailman/options/gcc-patches>, <mailto:gcc-patches-request@gcc.gnu.org?subject=unsubscribe> List-Archive: <https://gcc.gnu.org/pipermail/gcc-patches/> List-Post: <mailto:gcc-patches@gcc.gnu.org> List-Help: <mailto:gcc-patches-request@gcc.gnu.org?subject=help> List-Subscribe: <https://gcc.gnu.org/mailman/listinfo/gcc-patches>, <mailto:gcc-patches-request@gcc.gnu.org?subject=subscribe> Errors-To: gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org Sender: "Gcc-patches" <gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org> X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1769339841917786845?= X-GMAIL-MSGID: =?utf-8?q?1769339841917786845?= |
Series |
[1/1] libcpp: allow UCS_LIMIT codepoints in UTF-8 strings
|
|
Checks
Context | Check | Description |
---|---|---|
snail/gcc-patch-check | warning | Git am fail log |
Commit Message
Ben Boeckel
June 21, 2023, 6:58 p.m. UTC
libcpp/
* charset.cc: Allow `UCS_LIMIT` in UTF-8 strings.
Reported-by: Damien Guibouret <damien.guibouret@partition-saving.com>
Fixes: c1dbaa6656a (libcpp: reject codepoints above 0x10FFFF, 2023-06-06)
Signed-off-by: Ben Boeckel <ben.boeckel@kitware.com>
---
libcpp/charset.cc | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
Comments
On 6/21/23 14:58, Ben Boeckel wrote: > libcpp/ > > * charset.cc: Allow `UCS_LIMIT` in UTF-8 strings. > > Reported-by: Damien Guibouret <damien.guibouret@partition-saving.com> > Fixes: c1dbaa6656a (libcpp: reject codepoints above 0x10FFFF, 2023-06-06) > Signed-off-by: Ben Boeckel <ben.boeckel@kitware.com> Applied, moving the Fixes line up and changing the commit ID to the git gcc-descr version. Thanks. > --- > libcpp/charset.cc | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/libcpp/charset.cc b/libcpp/charset.cc > index d4f573e365f..54ebab2b8a4 100644 > --- a/libcpp/charset.cc > +++ b/libcpp/charset.cc > @@ -1891,7 +1891,7 @@ cpp_valid_utf8_p (const char *buffer, size_t num_bytes) > invalid because they cannot be represented in UTF-16. > > Reject such values.*/ > - if (cp >= UCS_LIMIT) > + if (cp > UCS_LIMIT) > return false; > } > /* No problems encountered. */
diff --git a/libcpp/charset.cc b/libcpp/charset.cc index d4f573e365f..54ebab2b8a4 100644 --- a/libcpp/charset.cc +++ b/libcpp/charset.cc @@ -1891,7 +1891,7 @@ cpp_valid_utf8_p (const char *buffer, size_t num_bytes) invalid because they cannot be represented in UTF-16. Reject such values.*/ - if (cp >= UCS_LIMIT) + if (cp > UCS_LIMIT) return false; } /* No problems encountered. */