diff options
| -rw-r--r-- | tests/test_relocation.c | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/tests/test_relocation.c b/tests/test_relocation.c index 891e346..8a6bc49 100644 --- a/tests/test_relocation.c +++ b/tests/test_relocation.c @@ -14,8 +14,7 @@ void test_replace_text() { const char *target = targets[i]; const char *expected = targets[i + 1]; char input[STASIS_BUFSIZ] = {0}; - strncpy(input, test_string, sizeof(input) - 1); - input[sizeof(input) - 1] = '\0'; + safe_strncpy(input, test_string, sizeof(input)); printf("input: %s\n", input); printf("target: %s\n", target); |
