coverity: suppress warnings

pull/3534/head
Victor Julien 8 years ago
parent 2010610c91
commit 506f299b09

@ -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");

@ -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,

@ -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;

Loading…
Cancel
Save