Browse code

different initialization for ytable

Kevin Lin authored on 2015/02/13 05:10:14
Showing 1 changed files
... ...
@@ -2982,6 +2982,7 @@ static unsigned int yara_total, yara_loaded, yara_malform, yara_complex;
2982 2982
 static int load_oneyara(YR_RULE *rule, struct cl_engine *engine, unsigned int options, unsigned int *sigs)
2983 2983
 {
2984 2984
     YR_STRING *string;
2985
+    struct cli_ytable ytable;
2985 2986
     int str_error = 0, i = 0, ret = CL_SUCCESS;
2986 2987
     struct cli_lsig_tdb tdb;
2987 2988
     uint32_t lsigid[2];
... ...
@@ -2993,10 +2994,10 @@ static int load_oneyara(YR_RULE *rule, struct cl_engine *engine, unsigned int op
2993 2993
     uint8_t has_short_string;
2994 2994
     char *exp_op = "|";
2995 2995
 
2996
-    struct cli_ytable ytable = { 0 };
2997
-
2998 2996
     cli_yaramsg("load_oneyara: attempting to load %s\n", rule->id);
2999 2997
 
2998
+    memset(&ytable, 0, sizeof(ytable));
2999
+
3000 3000
     if (!rule) {
3001 3001
         cli_errmsg("load_oneyara: empty rule passed as argument\n");
3002 3002
         return CL_ENULLARG;