diff options
| author | Joseph Hunkeler <jhunkeler@gmail.com> | 2026-06-02 13:11:49 -0400 |
|---|---|---|
| committer | Joseph Hunkeler <jhunkeler@gmail.com> | 2026-06-02 13:11:49 -0400 |
| commit | a9c8746a324e820d3452e44a67e6cab502fd58b5 (patch) | |
| tree | dd79e44c143760fbc54aac5f3ac9affd53a004f3 | |
| parent | 225da8772b5a342c6c0612f57faf13e20cc29bf8 (diff) | |
| download | stasis-a9c8746a324e820d3452e44a67e6cab502fd58b5.tar.gz | |
Replace string functions
| -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); |
