Skip to content

Commit c1354fd

Browse files
authored
Merge pull request #2552 from signalwire/email
[Core] switch_simple_email: Coverity 1227612 Calling risky function
2 parents c303c98 + 0974bd1 commit c1354fd

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/switch_utils.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1160,7 +1160,7 @@ SWITCH_DECLARE(switch_bool_t) switch_simple_email(const char *to,
11601160
switch_safe_free(dupfile);
11611161
}
11621162

1163-
switch_snprintf(filename, 80, "%s%smail.%d%04x", SWITCH_GLOBAL_dirs.temp_dir, SWITCH_PATH_SEPARATOR, (int)(switch_time_t) switch_epoch_time_now(NULL), rand() & 0xffff);
1163+
switch_snprintf(filename, 80, "%s%smail.%d%04x", SWITCH_GLOBAL_dirs.temp_dir, SWITCH_PATH_SEPARATOR, (int)(switch_time_t) switch_epoch_time_now(NULL), switch_rand() & 0xffff);
11641164

11651165
if ((fd = open(filename, O_WRONLY | O_CREAT | O_TRUNC, 0644)) > -1) {
11661166
if (file) {

0 commit comments

Comments
 (0)