mirror of
https://github.com/haproxy/haproxy.git
synced 2026-04-21 06:06:59 -04: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
1 changed files with 2 additions and 0 deletions
|
|
@ -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…
Reference in a new issue