]> git.ipfire.org Git - thirdparty/freeswitch.git/commitdiff
[Core] Coverity: 1500229 Use of 32-bit time_t
authorAndrey Volk <andywolk@gmail.com>
Sun, 1 Oct 2023 10:05:30 +0000 (13:05 +0300)
committerAndrey Volk <andywolk@gmail.com>
Sun, 1 Oct 2023 10:05:30 +0000 (13:05 +0300)
src/switch_utils.c

index c51953f0cffc34deb4d238b8989ee6569f1cb52b..64f26bd6ba58dec36c876a34902f33053dd7b998 100644 (file)
@@ -1161,7 +1161,7 @@ SWITCH_DECLARE(switch_bool_t) switch_simple_email(const char *to,
                switch_safe_free(dupfile);
        }
 
-       switch_snprintf(filename, 80, "%s%smail.%d%04x", SWITCH_GLOBAL_dirs.temp_dir, SWITCH_PATH_SEPARATOR, (int) switch_epoch_time_now(NULL), rand() & 0xffff);
+       switch_snprintf(filename, 80, "%s%smail.%d%04x", SWITCH_GLOBAL_dirs.temp_dir, SWITCH_PATH_SEPARATOR, (int)(intptr_t)switch_epoch_time_now(NULL), rand() & 0xffff);
 
        if ((fd = open(filename, O_WRONLY | O_CREAT | O_TRUNC, 0644)) > -1) {
                if (file) {