]> granicus.if.org Git - curl/commit
urlapi: fix portnumber parsing for ipv6 zone index
authorDaniel Gustafsson <daniel@yesql.se>
Tue, 11 Dec 2018 14:02:19 +0000 (15:02 +0100)
committerDaniel Gustafsson <daniel@yesql.se>
Tue, 11 Dec 2018 14:02:19 +0000 (15:02 +0100)
commit63533cbde279ce91ed9e9c92d47b6297235d1d02
tree5212a395bb3649fb24535c4eff2abd6c0305a4ed
parent552f0205e6901889a965fe679f4afeeeed7f4955
urlapi: fix portnumber parsing for ipv6 zone index

An IPv6 URL which contains a zone index includes a '%%25<zode id>'
string before the ending ']' bracket. The parsing logic wasn't set
up to cope with the zone index however, resulting in a malformed url
error being returned. Fix by breaking the parsing into two stages
to correctly handle the zone index.

Closes #3355
Closes #3319
Reported-by: tonystz on Github
Reviewed-by: Daniel Stenberg <daniel@haxx.se>
Reviewed-by: Marcel Raad <Marcel.Raad@teamviewer.com>
lib/urlapi.c