public inbox for gcc@gcc.gnu.org
 help / color / mirror / Atom feed
From: Jason Merrill <jason@redhat.com>
To: Ben Boeckel <me@benboeckel.net>, gcc-patches@gcc.gnu.org
Cc: Ben Boeckel <ben.boeckel@kitware.com>,
	gcc@gcc.gnu.org, brad.king@kitware.com,
	Damien Guibouret <damien.guibouret@partition-saving.com>
Subject: Re: [PATCH 1/1] libcpp: allow UCS_LIMIT codepoints in UTF-8 strings
Date: Fri, 23 Jun 2023 16:05:41 -0400	[thread overview]
Message-ID: <e08a040f-b8c7-979a-ab64-bb98cd36c24d@redhat.com> (raw)
In-Reply-To: <20230621185820.1766291-1-ben.boeckel@kitware.com>

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.  */


      reply	other threads:[~2023-06-23 20:05 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-06-21 18:58 Ben Boeckel
2023-06-23 20:05 ` Jason Merrill [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=e08a040f-b8c7-979a-ab64-bb98cd36c24d@redhat.com \
    --to=jason@redhat.com \
    --cc=ben.boeckel@kitware.com \
    --cc=brad.king@kitware.com \
    --cc=damien.guibouret@partition-saving.com \
    --cc=gcc-patches@gcc.gnu.org \
    --cc=gcc@gcc.gnu.org \
    --cc=me@benboeckel.net \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).