mirror of
https://git.haproxy.org/git/haproxy.git/
synced 2026-05-04 20:46:11 +02:00
BUG/MEDIUM: buffer: Fix the wrapping case in bo_putblk
When the block of data need to be split to support the wrapping, the start of the second block of data was wrong. We must be sure to skip data copied during the first memcpy. This patch must be backported to 1.8, 1.7, 1.6 and 1.5.
This commit is contained in:
parent
35a62705df
commit
b2b279464c
@ -468,7 +468,7 @@ static inline int bo_putblk(struct buffer *b, const char *blk, int len)
|
||||
memcpy(b->p, blk, half);
|
||||
b->p = b_ptr(b, half);
|
||||
if (len > half) {
|
||||
memcpy(b->p, blk, len - half);
|
||||
memcpy(b->p, blk + half, len - half);
|
||||
b->p = b_ptr(b, half);
|
||||
}
|
||||
b->o += len;
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user