We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent cd4218b commit 4f55b5dCopy full SHA for 4f55b5d
apache2/modsecurity.c
@@ -237,7 +237,7 @@ static void modsecurity_persist_data(modsec_rec *msr) {
237
}
238
239
/* Remove stale collections. */
240
- if (rand() < RAND_MAX/100) {
+ if (ap_random_pick(0, RAND_MAX) < RAND_MAX/100) {
241
arr = apr_table_elts(msr->collections);
242
te = (apr_table_entry_t *)arr->elts;
243
for (i = 0; i < arr->nelts; i++) {
0 commit comments