]> git.ipfire.org Git - thirdparty/suricata.git/commitdiff
filestore: fix dropping of unwanted files (Issue #2853)
authormagenbluten <magenbluten@codemonkey.cc>
Wed, 27 Feb 2019 09:14:17 +0000 (09:14 +0000)
committerVictor Julien <victor@inliniac.net>
Fri, 3 May 2019 13:56:50 +0000 (15:56 +0200)
src/detect-filestore.c
src/util-file.c

index 8d88e02159871fc831132099c81857734b38878e..1114974140366f26ba3a6f6e0b368c29a8b77be3 100644 (file)
@@ -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));
index 305044f8b60c94396760828ecc54830ad8986b75..4d21f5c6e9d80b24e3653de850d763f5e2d87b60 100644 (file)
@@ -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);
             }
         }