]> git.ipfire.org Git - thirdparty/suricata.git/commitdiff
dataset: fix return value check on isnotset
authorJason Ish <jason.ish@oisf.net>
Thu, 3 Oct 2019 21:54:51 +0000 (15:54 -0600)
committerVictor Julien <victor@inliniac.net>
Fri, 4 Oct 2019 13:04:57 +0000 (15:04 +0200)
The dataset api returns -1 for not found.

src/detect-dataset.c

index 0589e19b6821c60665f8b23c4f50eb5d97f6984a..b9d2df152066aaf2061f3b65957ce64d7e54568f 100644 (file)
@@ -83,7 +83,7 @@ int DetectDatasetBufferMatch(DetectEngineThreadCtx *det_ctx,
             //PrintRawDataFp(stdout, data, data_len);
             int r = DatasetLookup(sd->set, data, data_len);
             SCLogDebug("r %d", r);
-            if (r == 0)
+            if (r < 1)
                 return 1;
             break;
         }