Skip to content

Commit

Permalink
Ensure UA token evaluation is propertly short-circuited.
Browse files Browse the repository at this point in the history
  • Loading branch information
allinurl committed Nov 5, 2017
1 parent 393ece7 commit 04323bc
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/browsers.c
Original file line number Diff line number Diff line change
Expand Up @@ -366,7 +366,7 @@ verify_browser (char *str, char *type)
/* Check if there are spaces in the token string, that way strpbrk
* does not stop at the first space within the token string */
if ((cnt = count_matches (browsers[i][0], ' ')) && (b = a)) {
while ((b = strchr (b, ' ')) && space++ < cnt)
while (space++ < cnt && (b = strchr (b, ' ')))
b++;
} else
b = a;
Expand Down

0 comments on commit 04323bc

Please sign in to comment.