]> git.ipfire.org Git - thirdparty/haproxy.git/commit
BUG/MINOR: tools: url2sa reads too far when no port nor path
authorWilliam Lallemand <wlallemand@haproxy.org>
Fri, 25 Mar 2022 16:37:51 +0000 (17:37 +0100)
committerWilliam Lallemand <wlallemand@haproxy.org>
Fri, 25 Mar 2022 16:48:28 +0000 (17:48 +0100)
commit3d7a9186dd650dc4106a64bb57c49b990c3cbbeb
tree31d9b63d97a7727ebadc7b041ae5fd955d1e3820
parentd8769d1d877e22d6d50737fc0f1ffb644535a4b2
BUG/MINOR: tools: url2sa reads too far when no port nor path

url2sa() still have an unfortunate case where it reads 1 byte too far,
it happens when no port or path are specified in the URL, and could
crash if the byte after the URL is not allocated (mostly with ASAN).

This case is never triggered in old versions of haproxy because url2sa
is used with buffers which are way bigger than the URL. It is only
triggered with the httpclient.

Should be bacported in every stable branches.
src/tools.c