mirror of
https://git.haproxy.org/git/haproxy.git/
synced 2025-09-22 14:21:25 +02:00
BUG/MEDIUM: buffer: Fix the wrapping case in bi_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 skup data copied during the first memcpy. This patch must be backported to 1.8.
This commit is contained in:
parent
b2b279464c
commit
ca6ef50661
@ -577,7 +577,7 @@ static inline int bi_putblk(struct buffer *b, const char *blk, int len)
|
||||
|
||||
memcpy(bi_end(b), blk, half);
|
||||
if (len > half)
|
||||
memcpy(b_ptr(b, b->i + half), blk, len - half);
|
||||
memcpy(b_ptr(b, b->i + half), blk + half, len - half);
|
||||
b->i += len;
|
||||
return len;
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user