summaryrefslogtreecommitdiff
path: root/test-suite/standalone/test-unwind.c
diff options
context:
space:
mode:
authorThien-Thi Nguyen <ttn@gnuvola.org>2010-01-13 09:49:44 +0100
committerAndy Wingo <wingo@pobox.com>2010-01-13 20:49:37 +0100
commitbd4b6c1a83a857f48e63fd64c276c77457c41bca (patch)
treebe0b0c306366e6f0f3b093a974813090986b86fb /test-suite/standalone/test-unwind.c
parente744e076fae41492fb990bc32594d9daf2908094 (diff)
downloadguile-bd4b6c1a83a857f48e63fd64c276c77457c41bca.tar.gz
Use `mkstemp' instead of `mktemp'.
* test-suite/standalone/test-unwind.c (check_ports): Use `mkstemp' instead of `mktemp'. Signed-off-by: Thien-Thi Nguyen <ttn@gnuvola.org>
Diffstat (limited to 'test-suite/standalone/test-unwind.c')
-rw-r--r--test-suite/standalone/test-unwind.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/test-suite/standalone/test-unwind.c b/test-suite/standalone/test-unwind.c
index f9820cc22..f333c8c3a 100644
--- a/test-suite/standalone/test-unwind.c
+++ b/test-suite/standalone/test-unwind.c
@@ -210,7 +210,9 @@ check_ports ()
strcpy (filename, tmpdir);
strcat (filename, FILENAME_TEMPLATE);
- if (mktemp (filename) == NULL)
+ /* Sanity check: Make sure that `filename' is actually writeable.
+ We used to use mktemp(3), but that is now considered a security risk. */
+ if (0 > mkstemp (filename))
exit (1);
scm_dynwind_begin (0);