From: magenbluten Date: Wed, 27 Feb 2019 09:14:17 +0000 (+0000) Subject: filestore: fix dropping of unwanted files (Issue #2853) X-Git-Tag: suricata-5.0.0-rc1~516 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=09a21627d58270e0597d9ae9db68fa454d9f0b45;p=thirdparty%2Fsuricata.git filestore: fix dropping of unwanted files (Issue #2853) --- diff --git a/src/detect-filestore.c b/src/detect-filestore.c index 8d88e02159..1114974140 100644 --- a/src/detect-filestore.c +++ b/src/detect-filestore.c @@ -267,7 +267,7 @@ static int DetectFilestoreMatch (ThreadVars *t, DetectEngineThreadCtx *det_ctx, /* file can be NULL when a rule with filestore scope > file * matches. */ 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_cnt >= file->sid_max) { void *p = SCRealloc(file->sid, sizeof(uint32_t) * (file->sid_max + 8)); diff --git a/src/util-file.c b/src/util-file.c index 305044f8b6..4d21f5c6e9 100644 --- a/src/util-file.c +++ b/src/util-file.c @@ -1278,7 +1278,7 @@ void FileStoreFileById(FileContainer *fc, uint32_t file_id) if (fc != NULL) { 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); } }