diff options
Diffstat (limited to 'tests/test_utils.c')
| -rw-r--r-- | tests/test_utils.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/tests/test_utils.c b/tests/test_utils.c index a5faf5c..4f89509 100644 --- a/tests/test_utils.c +++ b/tests/test_utils.c @@ -312,6 +312,7 @@ void test_path_dirname() { const char *expected = data[i + 1]; char tmp[PATH_MAX] = {0}; strncpy(tmp, input, sizeof(tmp) - 1); + tmp[sizeof(tmp) - 1] = '\0'; char *result = path_dirname(tmp); STASIS_ASSERT(strcmp(expected, result) == 0, NULL); |
