-
You use of
strtok()is wrong:line = strtok(buffer, NULL);should be
line = strtok(NULL, delim);Another mistakes should be fixed similarly.
-
The elements of
text_linesare uninitialized:text_lines = malloc(6000 * sizeof(char*));this allocated 6000 pointers to
char, but none of these pointers are initialized.
0
solved where is the pthread segfault happening?