Fix potential segfault (42)
This commit is contained in:
parent
10afb1cd9b
commit
e87605ad86
@ -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;
|
||||
|
Loading…
Reference in New Issue
Block a user