]> granicus.if.org Git - onig/commitdiff
add OPT_EXACT_MAXLEN value check
authorK.Kosako <kosako@sofnec.co.jp>
Fri, 21 Sep 2018 06:56:00 +0000 (15:56 +0900)
committerK.Kosako <kosako@sofnec.co.jp>
Fri, 21 Sep 2018 06:56:00 +0000 (15:56 +0900)
src/regcomp.c

index 8bc68979214b536025760d8d58227eb3d1699794..053ca85632f66602fd0d79d497e65a389f7c1639 100644 (file)
@@ -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 */