From 252b9646c1cb0538123d51ced4a733f3dcfc266b Mon Sep 17 00:00:00 2001 From: Joseph Hunkeler Date: Tue, 2 Jun 2026 17:04:13 -0400 Subject: Safe strings, finally (#145) * Add string copy and catonate replacements * safe_strncpy * safe_strncat * Replace string functions * gbo.ini: Update tweakwcs to 0.9.0 * generic.ini: Update tweakwcs to 0.9.0 --- tests/test_relocation.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'tests/test_relocation.c') 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