]> git.ipfire.org Git - people/ms/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>
Tue, 30 Oct 2018 09:21:34 +0000 (10:21 +0100)
src/detect-engine.c
src/util-pidfile.c
src/util-storage.c

index 7ecf7513902fe5fe6fb612f07a91a0c9692af025..830a41427dd09f221f21e0af7c38e586f0166e21 100644 (file)
@@ -2040,6 +2040,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 b801e41e468e352157cff574ebd78d1d3ef56594..acb92b230ef1075dfdc7b95ec93eb5640c149afe 100644 (file)
@@ -108,6 +108,7 @@ int SCPidfileTestRunning(const char *pid_filename)
         /* Check if the existing process is still alive. */
         FILE *pf;
 
+        // coverity[toctou : FALSE]
         pf = fopen(pid_filename, "r");
         if (pf == NULL) {
             SCLogError(SC_ERR_INITIALIZATION,
index 756ef240d602b071e1513111ad23f4ffdfe9840f..1d6ee129a64090dbcb5790f0ff4cc87aba97d01a 100644 (file)
@@ -261,6 +261,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;