Project

General

Profile

Actions

Bug #4495

closed

output: threaded output coverity warning

Added by Victor Julien 4 months ago. Updated 4 months ago.

Status:
Closed
Priority:
Normal
Assignee:
Target version:
Affected Versions:
Effort:
Difficulty:
Label:

Description

New defect(s) Reported-by: Coverity Scan
Showing 1 of 1 defect(s)

** CID 1484903:  Null pointer dereferences  (FORWARD_NULL)

________________________________________________________________________________________________________
*** CID 1484903:  Null pointer dereferences  (FORWARD_NULL)
/src/util-logopenfile.c: 349 in SCLogOpenThreadedFile()
343                 goto error_exit;
344             }
345             SCLogDebug("Allocated %d file context pointers for threaded array",
346                         parent_ctx->threads->slot_count);
347             int slot = 1;
348             for (; slot < parent_ctx->threads->slot_count; slot++) {
>>>     CID 1484903:  Null pointer dereferences  (FORWARD_NULL)
>>>     Passing null pointer "append" to "LogFileNewThreadedCtx", which dereferences it.
349                 if (!LogFileNewThreadedCtx(parent_ctx, log_path, append, slot)) {
350                     /* TODO: clear allocated entries [1, slot) */
351                     goto error_exit;
352                 }
353             }
354             SCMutexInit(&parent_ctx->threads->mutex, NULL);
Actions #1

Updated by Jeff Lucovsky 4 months ago

  • Status changed from Assigned to In Review
Actions #2

Updated by Jeff Lucovsky 4 months ago

  • Status changed from In Review to Closed
Actions

Also available in: Atom PDF