]> granicus.if.org Git - php/commitdiff
Small fix to the literal IPv6 parsing, now stops at first ] after [
authorStig Venaas <venaas@php.net>
Fri, 22 Sep 2000 00:33:55 +0000 (00:33 +0000)
committerStig Venaas <venaas@php.net>
Fri, 22 Sep 2000 00:33:55 +0000 (00:33 +0000)
ext/standard/url.c

index 004956081c3a328bd2283649278ec9d709511037..a0f060e75c95b3030aba08bcd891da679d5ce70c 100644 (file)
@@ -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);