From: Kyle J. McKay Date: Wed, 17 Dec 2014 14:52:07 +0000 (+0100) Subject: parseurlandfillconn(): fix improper non-numeric scope_id stripping. X-Git-Tag: curl-7_40_0~128 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=14c3601583bfe171a33971115220378d5076e3b8;p=curl parseurlandfillconn(): fix improper non-numeric scope_id stripping. Fixes SF bug 1149: http://sourceforge.net/p/curl/bugs/1449/ --- diff --git a/lib/url.c b/lib/url.c index cbc750904..3d6f8fd14 100644 --- a/lib/url.c +++ b/lib/url.c @@ -4116,10 +4116,10 @@ static CURLcode parseurlandfillconn(struct SessionHandle *data, } } if(scopeidx > 0) { + char *p = percent + identifier_offset + strlen(ifname); + /* Remove zone identifier from hostname */ - memmove(percent, - percent + identifier_offset + strlen(ifname), - identifier_offset + strlen(ifname)); + memmove(percent, p, strlen(p) + 1); conn->scope_id = scopeidx; } else