22 lines
466 B
Plaintext
22 lines
466 B
Plaintext
Index: src/misc.c
|
|
--- src/misc.c.orig
|
|
+++ src/misc.c
|
|
@@ -2158,8 +2158,6 @@ random_organization(
|
|
if (*in_org != '/')
|
|
return in_org;
|
|
|
|
- srand((unsigned int) time(NULL));
|
|
-
|
|
if ((orgfp = fopen(in_org, "r")) == NULL)
|
|
return selorg;
|
|
|
|
@@ -2173,7 +2171,7 @@ random_organization(
|
|
}
|
|
|
|
rewind(orgfp);
|
|
- sol = rand() % nool + 1;
|
|
+ sol = arc4random_uniform(nool) + 1;
|
|
nool = 0;
|
|
while ((nool != sol) && (fgets(selorg, (int) sizeof(selorg), orgfp)))
|
|
nool++;
|