mirror of
https://git.haproxy.org/git/haproxy.git/
synced 2025-09-23 06:41:32 +02:00
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:
parent
11adb1d8fc
commit
d439a49655
@ -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;
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user