From: Victor Julien Date: Tue, 23 Oct 2018 13:01:42 +0000 (+0200) Subject: coverity: suppress warnings X-Git-Tag: suricata-4.0.6~17 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=1f7f13674883ceb76397d86059b76eb0295980d3;p=thirdparty%2Fsuricata.git coverity: suppress warnings --- diff --git a/src/detect-engine.c b/src/detect-engine.c index 8580bb013e..978bf34bb3 100644 --- a/src/detect-engine.c +++ b/src/detect-engine.c @@ -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"); diff --git a/src/util-pidfile.c b/src/util-pidfile.c index a68188b7e6..382e678273 100644 --- a/src/util-pidfile.c +++ b/src/util-pidfile.c @@ -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, diff --git a/src/util-storage.c b/src/util-storage.c index 21bbf4e061..7954f29765 100644 --- a/src/util-storage.c +++ b/src/util-storage.c @@ -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;