From bc13633d196c0cf7631705298f3accde60ee698c Mon Sep 17 00:00:00 2001 From: Kevin Day Date: Fri, 10 Dec 2021 22:43:40 -0600 Subject: [PATCH] Bugfix: f_utf_unicode_string_to() not treating numbers larger than 0x10FFFF as invalid. The max unicode sequence is 0x10FFFF. Anything beyond that must be treated as invalid. --- level_0/f_utf/c/utf.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/level_0/f_utf/c/utf.c b/level_0/f_utf/c/utf.c index 80a9e8a..0b913c6 100644 --- a/level_0/f_utf/c/utf.c +++ b/level_0/f_utf/c/utf.c @@ -1914,6 +1914,10 @@ extern "C" { } } // for + if (value > 0x10ffff) { + return F_status_set_error(F_valid_not); + } + *unicode = value; return F_none; -- 1.8.3.1