fix rule_monitor_loop bug

This commit is contained in:
liuwentan
2023-02-16 16:45:06 +08:00
parent d1b015226e
commit b5b47837d2
12 changed files with 160 additions and 93 deletions

View File

@@ -429,7 +429,9 @@ int flag_runtime_scan(struct flag_runtime *flag_rt, int thread_id,
n_hit_item = MAX_SCANNER_HIT_ITEM_NUM;
}
int hit_item_ids[MAX_SCANNER_HIT_ITEM_NUM] = {-1};
int hit_item_ids[MAX_SCANNER_HIT_ITEM_NUM];
memset(hit_item_ids, -1, sizeof(hit_item_ids));
for (int i = 0; i < n_hit_item; i++) {
hit_item_ids[i] = hit_results[i].rule_id;
}