aboutsummaryrefslogtreecommitdiff
path: root/tests/test_relocation.c
diff options
context:
space:
mode:
authorJoseph Hunkeler <jhunkeler@gmail.com>2026-04-24 15:55:21 -0400
committerJoseph Hunkeler <jhunkeler@gmail.com>2026-04-24 15:55:21 -0400
commit347677c3330ece8496b9cd242fd7e4292c2260ae (patch)
treec82cb3540402231b4e534da15b758cfba686eaa9 /tests/test_relocation.c
parent8721fca71d83bad253428245f00f60bb74dde23e (diff)
downloadstasis-347677c3330ece8496b9cd242fd7e4292c2260ae.tar.gz
NUL terminate after copy
Diffstat (limited to 'tests/test_relocation.c')
-rw-r--r--tests/test_relocation.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/tests/test_relocation.c b/tests/test_relocation.c
index 69142dc..3454a69 100644
--- a/tests/test_relocation.c
+++ b/tests/test_relocation.c
@@ -15,6 +15,7 @@ void test_replace_text() {
const char *expected = targets[i + 1];
char input[BUFSIZ] = {0};
strncpy(input, test_string, sizeof(input) - 1);
+ input[sizeof(input) - 1] = '\0';
printf("input: %s\n", input);
printf("target: %s\n", target);