Skip to content

Commit bd36fe2

Browse files
Update exploithawk.c
1 parent 22b6dee commit bd36fe2

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

exploithawk.c

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -77,11 +77,11 @@ int matches_search(const char *str, const char *term) {
7777
char tmp[128];
7878
strncpy(tmp, term, sizeof(tmp));
7979
tmp[sizeof(tmp)-1] = 0;
80-
81-
char *part = strtok(tmp, "^");
80+
char *saveptr;
81+
char *part = strtok_r(tmp, "^", &saveptr);
8282
while (part != NULL) {
8383
if (!strcasestr(str, part)) return 0;
84-
part = strtok(NULL, "^");
84+
part = strtok_r(NULL, "^", &saveptr);
8585
}
8686
return 1;
8787
}

0 commit comments

Comments
 (0)