From: K.Kosako Date: Tue, 9 Jul 2019 07:34:18 +0000 (+0900) Subject: add check return valueof ONIGENC_CODE_TO_MBCLEN() X-Git-Tag: v6.9.3~61 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=c31babdd4c2db384c84ef643e3cbe8e205808a2a;p=onig add check return valueof ONIGENC_CODE_TO_MBCLEN() --- diff --git a/src/regcomp.c b/src/regcomp.c index ff3431f..6a29066 100644 --- a/src/regcomp.c +++ b/src/regcomp.c @@ -6681,6 +6681,7 @@ onig_is_code_in_cc(OnigEncoding enc, OnigCodePoint code, CClassNode* cc) } else { len = ONIGENC_CODE_TO_MBCLEN(enc, code); + if (len < 0) return 0; } return onig_is_code_in_cc_len(len, code, cc); }