mirror of
https://github.com/signalwire/freeswitch.git
synced 2025-03-13 12:40:17 +00:00
FS-8811 fix divide by 0
This commit is contained in:
parent
b80eb983ec
commit
f0c76fab80
@ -183,6 +183,8 @@ static int do_rand(uint32_t count)
|
||||
{
|
||||
int r = 0;
|
||||
|
||||
if (count == 0) return 0;
|
||||
|
||||
switch_mutex_lock(globals.mutex);
|
||||
r = (rand() % count) + 1;
|
||||
switch_mutex_unlock(globals.mutex);
|
||||
|
Loading…
x
Reference in New Issue
Block a user