DEBUG: buffer: check in __b_put_blk() whether the buffer room is respected

This adds a BUG_ON() to make sure we don't face other situations like the
one fixed by previous commit.
This commit is contained in:
Willy Tarreau 2022-02-18 17:33:27 +01:00
parent 11adb1d8fc
commit d439a49655

View File

@ -519,6 +519,8 @@ static inline void __b_putblk(struct buffer *b, const char *blk, size_t len)
{
size_t half = b_contig_space(b);
BUG_ON(b_data(b) + len > b_size(b));
if (half > len)
half = len;