then 1 character long. (Ilia)
- Fixed handling of return values from storred procedures in mssql_execute()
with multiple result sets returned. (Frank)
+- Fixed bug #28187 (parse_url() not handling embedded IPv6 in URLs). (Sara)
- Fixed bug #28147 (Crash with drawing anti-aliased lines). (Derick)
- Fixed bug #28112 (sqlite_query() crashing apache on malformed query). (Ilia,
Marcus)
}
/* check for port */
- if ((p = memchr(s, ':', (e-s)))) {
+ if (*s == '[' && *(e-1) == ']') {
+ /* Short circuit portscan
+ we're dealing with an
+ IPv6 embedded address */
+ p = s;
+ } else {
+ /* memchr is a GNU specific extension
+ Emulate for wide compatability */
+ for(p = e; *p != ':' && p >= s; p--);
+ }
+
+ if (p >= s && *p == ':') {
if (!ret->port) {
p++;
if (e-p > 5) { /* port cannot be longer then 5 characters */
} else {
p = e;
}
+
+ if (*s == '[' && *(p-1) == ']') {
+ s++;
+ p--;
+ }
/* check if we have a valid host, if we don't reject the string as url */
if ((p-s) < 1) {