public inbox for gcc-cvs@sourceware.org
help / color / mirror / Atom feed
* [gcc r14-2053] libcpp: allow UCS_LIMIT codepoints in UTF-8 strings
@ 2023-06-23 20:04 Jason Merrill
0 siblings, 0 replies; only message in thread
From: Jason Merrill @ 2023-06-23 20:04 UTC (permalink / raw)
To: gcc-cvs
https://gcc.gnu.org/g:b7fc0a3be52f78100a270b63e7555fde078fd2e3
commit r14-2053-gb7fc0a3be52f78100a270b63e7555fde078fd2e3
Author: Ben Boeckel <me@benboeckel.net>
Date: Wed Jun 21 14:58:20 2023 -0400
libcpp: allow UCS_LIMIT codepoints in UTF-8 strings
Fixes r14-1954 (libcpp: reject codepoints above 0x10FFFF, 2023-06-06)
libcpp/
* charset.cc: Allow `UCS_LIMIT` in UTF-8 strings.
Reported-by: Damien Guibouret <damien.guibouret@partition-saving.com>
Signed-off-by: Ben Boeckel <ben.boeckel@kitware.com>
Diff:
---
libcpp/charset.cc | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/libcpp/charset.cc b/libcpp/charset.cc
index d492f66adbc..7b625c9956a 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. */
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2023-06-23 20:04 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-06-23 20:04 [gcc r14-2053] libcpp: allow UCS_LIMIT codepoints in UTF-8 strings Jason Merrill
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).