BUG/MAJOR: buffer: fix incorrect check in __b_putblk()
This function was split in two at commit f7d0447
("MINOR: buffers:
split b_putblk() into __b_putblk()") but it's wrong, the first half's
length is not adjusted to the requested size so it copies more than
desired.
This is purely 1.9-specific, no backport is needed.
This commit is contained in:
parent
a0d11b6fd5
commit
ec3750c590
|
@ -494,6 +494,9 @@ static inline void __b_putblk(struct buffer *b, const char *blk, size_t len)
|
|||
{
|
||||
size_t half = b_contig_space(b);
|
||||
|
||||
if (half > len)
|
||||
half = len;
|
||||
|
||||
memcpy(b_tail(b), blk, half);
|
||||
|
||||
if (len > half)
|
||||
|
|
Loading…
Reference in New Issue