File tree Expand file tree Collapse file tree 1 file changed +21
-1
lines changed Expand file tree Collapse file tree 1 file changed +21
-1
lines changed Original file line number Diff line number Diff line change @@ -1560,7 +1560,6 @@ static PyObject* Rules_match(
1560
1560
int pid = -1 ;
1561
1561
int timeout = 0 ;
1562
1562
int error = ERROR_SUCCESS ;
1563
- int fast_mode = 0 ;
1564
1563
1565
1564
PyObject * externals = NULL ;
1566
1565
PyObject * fast = NULL ;
@@ -2129,6 +2128,27 @@ static PyObject* yara_compile(
2129
2128
& error_on_warning ,
2130
2129
& include_callback ))
2131
2130
{
2131
+ char num_args = 0 ;
2132
+
2133
+ if (filepath != NULL )
2134
+ num_args ++ ;
2135
+
2136
+ if (source != NULL )
2137
+ num_args ++ ;
2138
+
2139
+ if (file != NULL )
2140
+ num_args ++ ;
2141
+
2142
+ if (filepaths_dict != NULL )
2143
+ num_args ++ ;
2144
+
2145
+ if (sources_dict != NULL )
2146
+ num_args ++ ;
2147
+
2148
+ if (num_args > 1 )
2149
+ return PyErr_Format (
2150
+ PyExc_TypeError ,
2151
+ "compile is receiving too many arguments" );
2132
2152
2133
2153
error = yr_compiler_create (& compiler );
2134
2154
You can’t perform that action at this time.
0 commit comments