]> git.ipfire.org Git - thirdparty/haproxy.git/commit
BUG/MINOR: proxy: Fix input data copy when an error is captured
authorChristopher Faulet <cfaulet@haproxy.com>
Mon, 6 Jan 2020 10:37:00 +0000 (11:37 +0100)
committerChristopher Faulet <cfaulet@haproxy.com>
Mon, 6 Jan 2020 12:58:30 +0000 (13:58 +0100)
commit47a7210b9d377d91777f39241fab54d5f83b2728
tree28d2c0c3326803c7320611d7112db73bc4057527
parent1703478e2dd6bd12bb03b0a0fdcc7cd4a611dafc
BUG/MINOR: proxy: Fix input data copy when an error is captured

In proxy_capture_error(), input data are copied in the error snapshot. The copy
must take care of the data wrapping. But the length of the first block is
wrong. It should be the amount of contiguous input data that can be copied
starting from the input's beginning. But the mininum between the input length
and the buffer size minus the input length is used instead. So it is a problem
if input data are wrapping or if more than the half of the buffer is used by
input data.

This patch must be backported as far as 1.9.
src/proxy.c