From: Stig Venaas Date: Fri, 22 Sep 2000 00:33:55 +0000 (+0000) Subject: Small fix to the literal IPv6 parsing, now stops at first ] after [ X-Git-Tag: php-4.0.3RC1~73 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=9a9e2e72b0180202b147262f0e00399ac3b7de46;p=php Small fix to the literal IPv6 parsing, now stops at first ] after [ --- diff --git a/ext/standard/url.c b/ext/standard/url.c index 004956081c..a0f060e75c 100644 --- a/ext/standard/url.c +++ b/ext/standard/url.c @@ -116,7 +116,7 @@ php_url *url_parse(char *str) regfree(&re); /* free the old regex */ - if ((cerr=regcomp(&re, "^(([^@:]+)(:([^@:]+))?@)?((\\[(.*)\\])|([^:@]+))(:([^:@]+))?", REG_EXTENDED)) + if ((cerr=regcomp(&re, "^(([^@:]+)(:([^@:]+))?@)?((\\[([^]]+)\\])|([^:@]+))(:([^:@]+))?", REG_EXTENDED)) || (err=regexec(&re, result, 11, subs, 0))) { STR_FREE(ret->scheme); STR_FREE(ret->path);