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

@@ -509,7 +509,9 @@ int ip_runtime_scan(struct ip_runtime *ip_rt, int thread_id, int ip_type,
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] = scan_results[i].rule_id;
}