]> git.ipfire.org Git - thirdparty/suricata.git/commitdiff
coverity: suppress warnings
authorVictor Julien <victor@inliniac.net>
Tue, 23 Oct 2018 13:01:42 +0000 (15:01 +0200)
committerVictor Julien <victor@inliniac.net>
Thu, 1 Nov 2018 14:46:10 +0000 (15:46 +0100)
src/detect-engine.c
src/util-pidfile.c
src/util-storage.c

index 8580bb013efc6883e49f37e254a8df8ea79eaedc..978bf34bb3bc45887e96e073a2592c9f704cdd4f 100644 (file)
@@ -1558,6 +1558,7 @@ static void DetectEngineThreadCtxDeinitGlobalKeywords(DetectEngineThreadCtx *det
 static int DetectEngineThreadCtxInitKeywords(DetectEngineCtx *de_ctx, DetectEngineThreadCtx *det_ctx)
 {
     if (de_ctx->keyword_id > 0) {
+        // coverity[suspicious_sizeof : FALSE]
         det_ctx->keyword_ctxs_array = SCMalloc(de_ctx->keyword_id * sizeof(void *));
         if (det_ctx->keyword_ctxs_array == NULL) {
             SCLogError(SC_ERR_DETECT_PREPARE, "setting up thread local detect ctx");
index a68188b7e6167d89a35f50a8683f68b27151cc00..382e678273d811837566808873e2a6767a103a55 100644 (file)
@@ -109,6 +109,7 @@ int SCPidfileTestRunning(const char *pid_filename)
         pid_t pidv;
         FILE *pf;
 
+        // coverity[toctou : FALSE]
         pf = fopen(pid_filename, "r");
         if (pf == NULL) {
             SCLogError(SC_ERR_INITIALIZATION,
index 21bbf4e0612b00d23e61d6aea7844fead86de7fe..7954f2976575a16d91ab75cf5ada8a61ecec69ea 100644 (file)
@@ -259,6 +259,7 @@ void *StorageAllocById(Storage **storage, StorageEnum type, int id)
     StorageMapping *map = &storage_map[type][id];
     Storage *store = *storage;
     if (store == NULL) {
+        // coverity[suspicious_sizeof : FALSE]
         store = SCMalloc(sizeof(void *) * storage_max_id[type]);
         if (unlikely(store == NULL))
         return NULL;