From: Victor J. Orlikowski Date: Wed, 23 May 2001 15:13:02 +0000 (+0000) Subject: Change strtok() calls to use apr_strtok(). X-Git-Tag: 2.0.19~174 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=69ad06ffee46b92c87fc53fbc813fa2d2f0256fd;p=thirdparty%2Fapache%2Fhttpd.git Change strtok() calls to use apr_strtok(). git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@89221 13f79535-47bb-0310-9956-ffa450edef68 --- diff --git a/modules/proxy/proxy_ftp.c b/modules/proxy/proxy_ftp.c index 4ea3374583a..09c27727421 100644 --- a/modules/proxy/proxy_ftp.c +++ b/modules/proxy/proxy_ftp.c @@ -1015,17 +1015,18 @@ int ap_proxy_ftp_handler(request_rec *r, proxy_server_conf *conf, } else if (i == 229) { char *pstr; + char *tok_cntx; pstr = apr_pstrdup(p, buffer); - pstr = strtok(pstr, " "); /* separate result code */ + pstr = apr_strtok(pstr, " ", &tok_cntx); /* separate result code */ if (pstr != NULL) { if (*(pstr + strlen(pstr) + 1) == '=') { pstr += strlen(pstr) + 2; } else { - pstr = strtok(NULL, "("); /* separate address & port params */ + pstr = apr_strtok(NULL, "(", &tok_cntx); /* separate address & port params */ if (pstr != NULL) - pstr = strtok(NULL, ")"); + pstr = apr_strtok(NULL, ")", &tok_cntx); } } @@ -1103,19 +1104,20 @@ int ap_proxy_ftp_handler(request_rec *r, proxy_server_conf *conf, else if (i == 227) { unsigned int h0, h1, h2, h3, p0, p1; char *pstr; + char *tok_cntx; /* FIXME: Check PASV against RFC1123 */ pstr = apr_pstrdup(p, buffer); - pstr = strtok(pstr, " "); /* separate result code */ + pstr = apr_strtok(pstr, " ", &tok_cntx); /* separate result code */ if (pstr != NULL) { if (*(pstr + strlen(pstr) + 1) == '=') { pstr += strlen(pstr) + 2; } else { - pstr = strtok(NULL, "("); /* separate address & port params */ + pstr = apr_strtok(NULL, "(", &tok_cntx); /* separate address & port params */ if (pstr != NULL) - pstr = strtok(NULL, ")"); + pstr = apr_strtok(NULL, ")", &tok_cntx); } }