Skip to content

Commit 4e01bec

Browse files
committed
Fix Coverity issue BUFFER_SIZE
1 parent a9fa574 commit 4e01bec

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

src/memory_pool.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,9 @@ static int CTL_SUBTREE_HANDLER(default)(void *ctx,
6565
if (CTL_DEFAULT_ENTRIES[i][0] == '\0' ||
6666
strcmp(CTL_DEFAULT_ENTRIES[i], extra_name) == 0) {
6767
strncpy(CTL_DEFAULT_ENTRIES[i], extra_name, UMF_DEFAULT_LEN);
68+
CTL_DEFAULT_ENTRIES[i][UMF_DEFAULT_LEN - 1] = '\0';
6869
strncpy(CTL_DEFAULT_VALUES[i], arg, UMF_DEFAULT_LEN);
70+
CTL_DEFAULT_VALUES[i][UMF_DEFAULT_LEN - 1] = '\0';
6971
break;
7072
}
7173
}

0 commit comments

Comments
 (0)