diff options
| author | Mosder <git@mosder.eu> | 2026-10-06 17:25:17 +0200 |
|---|---|---|
| committer | Mosder <git@mosder.eu> | 2026-10-06 17:25:17 +0200 |
| commit | 4513d3c2733e63659320a0b4e23af9bdb72440b6 (patch) | |
| tree | b8e94e95f303ef8b090621d50f4c05fc76b51ef9 /tests/safe_tests.c | |
| parent | 7a1f842b91af4f916501eaea991b897e3db4c502 (diff) | |
added a temporary fix for glibc
Diffstat (limited to 'tests/safe_tests.c')
| -rw-r--r-- | tests/safe_tests.c | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/tests/safe_tests.c b/tests/safe_tests.c index 2a41700..25cd5f6 100644 --- a/tests/safe_tests.c +++ b/tests/safe_tests.c @@ -3,6 +3,7 @@ #include <limits.h> #include <stdlib.h> +#include <string.h> #include <unistd.h> TEST_HELPER(malloc_exit) { @@ -117,9 +118,11 @@ TEST(test_safe_pipe) { } TEST(test_safe_mkstemp) { - int fd = safe_mkstemp(".tmp"); + char f[128]; + strcpy(f, ".tmpXXXXXX"); + int fd = safe_mkstemp(f); test_assert(fd != -1, "Failed to create a temporary file"); - unlink(".tmp"); + unlink(f); close(fd); } |
