From a9c8746a324e820d3452e44a67e6cab502fd58b5 Mon Sep 17 00:00:00 2001 From: Joseph Hunkeler Date: Tue, 2 Jun 2026 13:11:49 -0400 Subject: Replace string functions --- tests/test_relocation.c | 3 +-- 1 file changed, 1 insertion(+), 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); -- cgit