]> granicus.if.org Git - onig/commitdiff
clear onig value in regcomp() (POSIX API)
authorK.Kosako <kosako@sofnec.co.jp>
Wed, 20 Mar 2019 03:42:31 +0000 (12:42 +0900)
committerK.Kosako <kosako@sofnec.co.jp>
Wed, 20 Mar 2019 03:42:31 +0000 (12:42 +0900)
src/regposix.c

index 67e70b92460c864cee81762b7305644ff867f41a..09e16ace8b8925a152c733b199b9b0b2c4ae92ec 100644 (file)
@@ -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;