Skip to content

Commit e5d60f0

Browse files
committed
DISMAN-EVENT-MIB: Initialize 'name' and 'name_buf'
This patch suppresses the following two Coverity reports: CID 407579: Uninitialized variables (UNINIT) Using uninitialized value "*name_buf" when calling "memcpy". [Note: The source code implementation of the function has been overridden by a builtin model.] CID 407578: Uninitialized variables (UNINIT) Using uninitialized value "name_buf_len".
1 parent eacb484 commit e5d60f0

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

agent/mibgroup/disman/event/mteTriggerConf.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -166,8 +166,8 @@ parse_mteMonitor(const char *token, const char *line)
166166

167167
int seen_name = 0;
168168
char oid_name_buf[SPRINT_MAX_LEN];
169-
oid name_buf[MAX_OID_LEN];
170-
size_t name_buf_len;
169+
oid name_buf[MAX_OID_LEN] = { };
170+
size_t name_buf_len = 0;
171171
u_char op = 0;
172172
long value = 0;
173173

0 commit comments

Comments
 (0)