From: Victor Julien Date: Tue, 23 Oct 2018 13:01:42 +0000 (+0200) Subject: coverity: suppress warnings X-Git-Tag: suricata-4.1.0~27 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=506f299b093023a1dc9d92e4b88a4285828054e7;p=thirdparty%2Fsuricata.git coverity: suppress warnings --- diff --git a/src/detect-engine.c b/src/detect-engine.c index 7ecf751390..830a41427d 100644 --- a/src/detect-engine.c +++ b/src/detect-engine.c @@ -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"); diff --git a/src/util-pidfile.c b/src/util-pidfile.c index b801e41e46..acb92b230e 100644 --- a/src/util-pidfile.c +++ b/src/util-pidfile.c @@ -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, diff --git a/src/util-storage.c b/src/util-storage.c index 756ef240d6..1d6ee129a6 100644 --- a/src/util-storage.c +++ b/src/util-storage.c @@ -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;