From: Kevin Day Date: Sat, 11 Dec 2021 04:43:40 +0000 (-0600) Subject: Bugfix: f_utf_unicode_string_to() not treating numbers larger than 0x10FFFF as invalid. X-Git-Tag: 0.5.7~53 X-Git-Url: https://git.kevux.org/?a=commitdiff_plain;h=bc13633d196c0cf7631705298f3accde60ee698c;p=fll 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. --- 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;