aboutsummaryrefslogtreecommitdiff
path: root/tests/test_system.c
diff options
context:
space:
mode:
Diffstat (limited to 'tests/test_system.c')
-rw-r--r--tests/test_system.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/tests/test_system.c b/tests/test_system.c
index 2271e13..9e4a862 100644
--- a/tests/test_system.c
+++ b/tests/test_system.c
@@ -54,7 +54,7 @@ void test_shell_safe_verify_restrictions() {
char cmd[PATH_MAX] = {0};
memset(&proc, 0, sizeof(proc));
- sprintf(cmd, "true%c false", invalid_chars[i]);
+ snprintf(cmd, sizeof(cmd), "true%c false", invalid_chars[i]);
shell_safe(&proc, cmd);
STASIS_ASSERT(proc.returncode == -1, "expected a negative result due to intentional error");
}