From: K.Kosako Date: Wed, 20 Mar 2019 03:42:31 +0000 (+0900) Subject: clear onig value in regcomp() (POSIX API) X-Git-Tag: v6.9.2_rc1~65^2~2 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=1de387c2177c668d356d7b567cf82e53a92f582c;p=onig clear onig value in regcomp() (POSIX API) --- diff --git a/src/regposix.c b/src/regposix.c index 67e70b9..09e16ac 100644 --- a/src/regposix.c +++ b/src/regposix.c @@ -149,6 +149,8 @@ regcomp(regex_t* reg, const char* pattern, int posix_options) OnigSyntaxType* syntax = OnigDefaultSyntax; OnigOptionType options; + reg->onig = (void* )0; + if ((posix_options & REG_EXTENDED) == 0) syntax = ONIG_SYNTAX_POSIX_BASIC;