1
0
mirror of https://github.com/signalwire/freeswitch.git synced 2025-03-04 01:37:14 +00:00

Merge pull request from signalwire/stun

[Core] switch_stun_random_string: Coverity 1227623 Calling risky function
This commit is contained in:
Andrey Volk 2024-07-30 20:15:25 +03:00 committed by GitHub
commit 8e3d398ed7
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

@ -135,7 +135,7 @@ SWITCH_DECLARE(void) switch_stun_random_string(char *buf, uint16_t len, char *se
max = (int) strlen(set);
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];
}
}