Fix potential segfault (42)

This commit is contained in:
Nathan Fisher 2022-09-11 18:50:56 -04:00
parent 10afb1cd9b
commit e87605ad86

View File

@ -60,11 +60,10 @@ int main(int argc, char *argv[]) {
rewinddir(d);
char *data = strdup(datadir);
time_t t;
srand((unsigned)time(&t));
srand((unsigned)time(NULL));
int m = rand() % n;
int m = rand() % (n - 1);
strncat(data, filesList[m], 4);
FILE *fp;
char *line = NULL;