mirror of
https://github.com/signalwire/freeswitch.git
synced 2026-07-23 12:42:02 +00:00
FS-8811 fix divide by 0
This commit is contained in:
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user