diff options
| author | Joseph Hunkeler <jhunkeler@users.noreply.github.com> | 2026-06-02 17:04:13 -0400 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2026-06-02 17:04:13 -0400 |
| commit | 252b9646c1cb0538123d51ced4a733f3dcfc266b (patch) | |
| tree | 84b300af068db367bd9f3262487aeef3c7ba22d0 /tests/test_relocation.c | |
| parent | d8ee8c27444a56bb98dd8bd67a019a1e9efbcc10 (diff) | |
| download | stasis-252b9646c1cb0538123d51ced4a733f3dcfc266b.tar.gz | |
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
Diffstat (limited to 'tests/test_relocation.c')
| -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); |
