Actions
Bug #7813
closedcppcheck: warnings in counters.c
Affected Versions:
Effort:
Difficulty:
Label:
Description
src/counters.c:1108:13: warning: If memory allocation fails, then there is a possible null pointer dereference: id [nullPointerOutOfMemory]
id->id = counters_global_id++;
^
src/counters.c:1106:26: note: Assuming allocation function fails
id = SCCalloc(1, sizeof(*id));
^
src/counters.c:1106:26: note: Assignment 'id=calloc(1,sizeof(*id))', assigned value is 0
id = SCCalloc(1, sizeof(*id));
^
src/counters.c:1108:13: note: Null pointer dereference
id->id = counters_global_id++;
^
src/counters.c:1109:13: warning: If memory allocation fails, then there is a possible null pointer dereference: id [nullPointerOutOfMemory]
id->string = pc->name;
^
src/counters.c:1106:26: note: Assuming allocation function fails
id = SCCalloc(1, sizeof(*id));
^
src/counters.c:1106:26: note: Assignment 'id=calloc(1,sizeof(*id))', assigned value is 0
id = SCCalloc(1, sizeof(*id));
^
src/counters.c:1109:13: note: Null pointer dereference
id->string = pc->name;
^
src/counters.c:1116:19: warning: If memory allocation fails, then there is a possible null pointer dereference: id [nullPointerOutOfMemory]
pc->gid = id->id;
^
src/counters.c:1106:26: note: Assuming allocation function fails
id = SCCalloc(1, sizeof(*id));
^
src/counters.c:1106:26: note: Assignment 'id=calloc(1,sizeof(*id))', assigned value is 0
id = SCCalloc(1, sizeof(*id));
^
src/counters.c:1116:19: note: Null pointer dereference
pc->gid = id->id;
^
Updated by Philippe Antoine 3 months ago
- Status changed from New to In Review
- Assignee changed from OISF Dev to Philippe Antoine
Updated by Jason Ish 3 months ago
- Status changed from In Review to Closed
Merged via https://github.com/OISF/suricata/pull/13683.
Actions