aboutsummaryrefslogtreecommitdiff
path: root/lib/url.c
diff options
context:
space:
mode:
Diffstat (limited to 'lib/url.c')
-rw-r--r--lib/url.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/lib/url.c b/lib/url.c
index 726e259ca..55d4463c8 100644
--- a/lib/url.c
+++ b/lib/url.c
@@ -1560,6 +1560,7 @@ static CURLcode Connect(struct UrlData *data,
* checked if the lowercase versions don't exist.
*/
char *no_proxy=NULL;
+ char *no_proxy_tok_buf;
char *proxy=NULL;
char proxy_env[128];
@@ -1571,7 +1572,7 @@ static CURLcode Connect(struct UrlData *data,
/* NO_PROXY wasn't specified or it wasn't just an asterisk */
char *nope;
- nope=no_proxy?strtok(no_proxy, ", "):NULL;
+ nope=no_proxy?strtok_r(no_proxy, ", ", &no_proxy_tok_buf):NULL;
while(nope) {
if(strlen(nope) <= strlen(conn->name)) {
char *checkn=
@@ -1581,7 +1582,7 @@ static CURLcode Connect(struct UrlData *data,
break;
}
}
- nope=strtok(NULL, ", ");
+ nope=strtok_r(NULL, ", ", &no_proxy_tok_buf);
}
if(!nope) {
/* It was not listed as without proxy */