[Core] switch_stun_random_string: Coverity 1227623 Calling risky function

This commit is contained in:
Andrey Volk 2024-06-07 14:56:56 +03:00
parent 060621e09d
commit c736458a21
1 changed files with 1 additions and 1 deletions

View File

@ -135,7 +135,7 @@ SWITCH_DECLARE(void) switch_stun_random_string(char *buf, uint16_t len, char *se
max = (int) strlen(set); max = (int) strlen(set);
for (x = 0; x < len; x++) { for (x = 0; x < len; x++) {
int j = (int) (max * 1.0 * rand() / (RAND_MAX + 1.0)); int j = (int) (max * 1.0 * switch_rand() / (SWITCH_RAND_MAX + 1.0));
buf[x] = set[j]; buf[x] = set[j];
} }
} }