Skip to content

Commit a9b042b

Browse files
Update exploithawk.c
1 parent a49169f commit a9b042b

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

exploithawk.c

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -111,12 +111,13 @@ void *load_csv_thread(void *arg) {
111111
while (fgets(line, sizeof(line), f)) {
112112
char *cols[10];
113113
int col = 0;
114-
char *p = strtok(line, ",");
114+
char *saveptr;
115+
char *p = strtok_r(line, ",", &saveptr);
115116
while (p && col < 10) {
116117
while (*p == ' ' || *p == '\t') p++;
117118
trim_newline(p);
118119
cols[col++] = p;
119-
p = strtok(NULL, ",");
120+
p = strtok_r(NULL, ",", &saveptr);
120121
}
121122
if (col >= 3 && matches_search(cols[2], search_term)) {
122123
trim_newline(cols[1]);

0 commit comments

Comments
 (0)