From: K.Kosako Date: Fri, 21 Sep 2018 06:56:00 +0000 (+0900) Subject: add OPT_EXACT_MAXLEN value check X-Git-Tag: v6.9.1~18^2~66 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=d361d2ed59ba51f0886650fa86463cdaf46ab839;p=onig add OPT_EXACT_MAXLEN value check --- diff --git a/src/regcomp.c b/src/regcomp.c index 8bc6897..053ca85 100644 --- a/src/regcomp.c +++ b/src/regcomp.c @@ -4574,6 +4574,10 @@ set_bm_skip(UChar* s, UChar* end, OnigEncoding enc ARG_UNUSED, UChar skip[]) #define OPT_EXACT_MAXLEN 24 +#if OPT_EXACT_MAXLEN >= ONIG_CHAR_TABLE_SIZE +#error Too big OPT_EXACT_MAXLEN +#endif + typedef struct { OnigLen min; /* min byte length */ OnigLen max; /* max byte length */