From 095193a9905caff27509a299d895d399d42c06aa Mon Sep 17 00:00:00 2001 From: Mattias Andrée Date: Sun, 21 Dec 2025 14:08:57 +0100 Subject: Fix truncation issue in libcmap_sprintf_range, and add LIBCMAP_ULTIMATE_CODEPOINT and LIBCMAP_UNIVERSE_RANGE MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Mattias Andrée --- Scripts.parse.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'Scripts.parse.c') diff --git a/Scripts.parse.c b/Scripts.parse.c index d5d167b..60ddfe9 100644 --- a/Scripts.parse.c +++ b/Scripts.parse.c @@ -79,13 +79,13 @@ parse_line(char *text, size_t lineno) } high = low = strtoul(text, &text, 16); - if (errno || low > 0x10FFFFUL) + if (errno || low > ULTIMATE_CODEPOINT) goto malformat; if (text[0] == '.' && text[1] == '.') { if (!isxdigit(text[2])) goto malformat; high = strtoul(&text[2], &text, 16); - if (errno || high > 0x10FFFFUL || high < low) + if (errno || high > ULTIMATE_CODEPOINT || high < low) goto malformat; } while (isspace(*text)) @@ -218,7 +218,7 @@ output(void) } nranges = 1U; ranges[0].low = 0; - ranges[0].high = 0x10FFFF; + ranges[0].high = ULTIMATE_CODEPOINT; for (i = 0; i < nscripts; i++) { scripts[i].nranges = join_ranges(scripts[i].ranges, scripts[i].nranges); -- cgit v1.3.1