In message <[email protected]> [email protected] wrote:
> Author: rjek > Date: Sat Dec 4 16:46:33 2010 > New Revision: 10990 > > URL: http://source.netsurf-browser.org?rev=10990&view=rev > Log: > Make urldb_add_url IPv6-aware > > Modified: > trunk/netsurf/content/urldb.c > > Modified: trunk/netsurf/content/urldb.c > URL: > http://source.netsurf-browser.org/trunk/netsurf/content/urldb.c?rev=10990&r1=10989&r2=10990&view=diff > ============================================================================== > --- trunk/netsurf/content/urldb.c (original) > +++ trunk/netsurf/content/urldb.c Sat Dec 4 16:46:33 2010 > @@ -791,12 +791,13 @@ > host++; > > /* get port and remove from host */ > - colon = strrchr(host, ':'); > - if (!colon) { > - port = 0; > - } else { > - *colon = '\0'; > - port = atoi(colon + 1); > + port = 0; > + if (host[strlen(host)] != ']') { Isn't host[strlen(host)] always NUL (assuming host points to a NUL terminated string) ? John. -- John Tytgat [email protected]
