diff options
Diffstat (limited to 'wsutil/tempfile.c')
-rw-r--r-- | wsutil/tempfile.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/wsutil/tempfile.c b/wsutil/tempfile.c index 7391fbfc76..5900b2bb8a 100644 --- a/wsutil/tempfile.c +++ b/wsutil/tempfile.c @@ -204,6 +204,7 @@ create_tempfile(char **namebuf, const char *pfx, const char *sfx) _tzset(); #endif current_time = time(NULL); + /* We trust the OS not to return a time before the Epoch. */ strftime(timestr, sizeof(timestr), "%Y%m%d%H%M%S", localtime(¤t_time)); sep[0] = G_DIR_SEPARATOR; tmp_file = g_strconcat(tmp_dir, sep, safe_pfx, "_", timestr, "_", TMP_FILE_SUFFIX, sfx, NULL); |