]> git.ipfire.org Git - thirdparty/haproxy.git/commit
BUG/MINOR: tools: fix url2sa return value with IPv4
authorWilliam Lallemand <wlallemand@haproxy.org>
Thu, 24 Mar 2022 20:59:03 +0000 (21:59 +0100)
committerWilliam Lallemand <wlallemand@haproxy.org>
Fri, 25 Mar 2022 10:49:27 +0000 (11:49 +0100)
commitb938b77ade7b75bff94f810eec78e7e065f04f81
tree7198ceac03f799fef73c079f71faf28167180b94
parentcc2764e7fe725f35845e978ace5f7fadef1c695d
BUG/MINOR: tools: fix url2sa return value with IPv4

Fix 8a91374 ("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 the 8a91374 patch was
backported.
src/tools.c