Skip to content

Commit 8e3d398

Browse files
authored
Merge pull request #2555 from signalwire/stun
[Core] switch_stun_random_string: Coverity 1227623 Calling risky function
2 parents 681dfee + c736458 commit 8e3d398

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/switch_stun.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -135,7 +135,7 @@ SWITCH_DECLARE(void) switch_stun_random_string(char *buf, uint16_t len, char *se
135135
max = (int) strlen(set);
136136

137137
for (x = 0; x < len; x++) {
138-
int j = (int) (max * 1.0 * rand() / (RAND_MAX + 1.0));
138+
int j = (int) (max * 1.0 * switch_rand() / (SWITCH_RAND_MAX + 1.0));
139139
buf[x] = set[j];
140140
}
141141
}

0 commit comments

Comments
 (0)