filestore: fix dropping of unwanted files (Issue #2853)

pull/3826/head
magenbluten 8 years ago committed by Victor Julien
parent 9132e4032a
commit 09a21627d5

@ -267,7 +267,7 @@ static int DetectFilestoreMatch (ThreadVars *t, DetectEngineThreadCtx *det_ctx,
/* file can be NULL when a rule with filestore scope > file /* file can be NULL when a rule with filestore scope > file
* matches. */ * matches. */
if (file != NULL) { if (file != NULL) {
file_id = file->file_store_id; file_id = file->file_track_id;
if (file->sid != NULL && s->id > 0) { if (file->sid != NULL && s->id > 0) {
if (file->sid_cnt >= file->sid_max) { if (file->sid_cnt >= file->sid_max) {
void *p = SCRealloc(file->sid, sizeof(uint32_t) * (file->sid_max + 8)); void *p = SCRealloc(file->sid, sizeof(uint32_t) * (file->sid_max + 8));

@ -1278,7 +1278,7 @@ void FileStoreFileById(FileContainer *fc, uint32_t file_id)
if (fc != NULL) { if (fc != NULL) {
for (ptr = fc->head; ptr != NULL; ptr = ptr->next) { for (ptr = fc->head; ptr != NULL; ptr = ptr->next) {
if (ptr->file_store_id == file_id) { if (ptr->file_track_id == file_id) {
FileStore(ptr); FileStore(ptr);
} }
} }

Loading…
Cancel
Save