aboutsummaryrefslogtreecommitdiff
path: root/tests/test_environment.c
diff options
context:
space:
mode:
authorJoseph Hunkeler <jhunkeler@gmail.com>2026-04-15 10:10:15 -0400
committerJoseph Hunkeler <jhunkeler@gmail.com>2026-04-15 10:10:15 -0400
commit87779a8c85eec0b71703ed3090a3949761396a15 (patch)
treec99afa5bca18be1ac2de9b937aa72b08d3285d44 /tests/test_environment.c
parent2258cd05bcded0125136c17d51568831ac421bf7 (diff)
downloadstasis-87779a8c85eec0b71703ed3090a3949761396a15.tar.gz
Replace sprintf with snprintf
* A few strcpy and strcat changes as well
Diffstat (limited to 'tests/test_environment.c')
-rw-r--r--tests/test_environment.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/tests/test_environment.c b/tests/test_environment.c
index 4f36883..9a503c0 100644
--- a/tests/test_environment.c
+++ b/tests/test_environment.c
@@ -58,7 +58,7 @@ void test_runtime() {
char output_truth[BUFSIZ] = {0};
char *your_path = runtime_get(env, "PATH");
- sprintf(output_truth, "Your PATH is '%s'.", your_path);
+ snprintf(output_truth, sizeof(output_truth), "Your PATH is '%s'.", your_path);
guard_free(your_path);
char *output_expanded = runtime_expand_var(env, "Your PATH is '${PATH}'.");