]> git.ipfire.org Git - thirdparty/haproxy.git/commit
BUG/MEDIUM: http: Prevent replace-header from overwriting a buffer
authorChristopher Faulet <cfaulet@haproxy.com>
Wed, 8 Feb 2017 11:17:07 +0000 (12:17 +0100)
committerWilly Tarreau <w@1wt.eu>
Wed, 8 Feb 2017 18:08:38 +0000 (19:08 +0100)
commit07a0fecced4a194c79c564f12fedfe9ca732713d
tree28abb9f2639fe4e47b5c88b08770af54e2c8a51a
parentf1cc5d0eaf8ac56ef574d7349e34a255b149869a
BUG/MEDIUM: http: Prevent replace-header from overwriting a buffer

This is the same fix as which concerning the redirect rules (0d94576c).

The buffer used to expand the <replace-fmt> argument must be protected to
prevent it being overwritten during build_logline() execution (the function used
to expand the format string).

This patch should be backported in 1.7, 1.6 and 1.5. It relies on commit b686afd
("MINOR: chunks: implement a simple dynamic allocator for trash buffers") for
the trash allocator, which has to be backported as well.
src/proto_http.c