mirror of
http://git.haproxy.org/git/haproxy.git/
synced 2024-12-15 16:04:37 +00:00
BUG/MINOR: tools: fix url2sa return value with IPv4
Fix8a91374
("BUG/MINOR: tools: url2sa reads ipv4 too far") introduced a regression in the value returned when parsing an ipv4 host. Tthe consumed length is supposed to be as far as the first character of the path, only its not computed correctly anymore and return the length minus the size of the scheme. Fixed the issue by reverting 'curr' and 'url' as they were before the patch. Must be backported in every stable branch where the8a91374
patch was backported.
This commit is contained in:
parent
cc2764e7fe
commit
b938b77ade
@ -1709,9 +1709,7 @@ int url2sa(const char *url, int ulen, struct sockaddr_storage *addr, struct spli
|
||||
out->host_len = ret;
|
||||
}
|
||||
|
||||
/* we need to assign again curr and end from the trash */
|
||||
url = trash.area;
|
||||
curr = trash.area + ret;
|
||||
curr += ret;
|
||||
|
||||
/* Decode port. */
|
||||
if (*curr == ':') {
|
||||
|
Loading…
Reference in New Issue
Block a user