mirror of
https://git.haproxy.org/git/haproxy.git/
synced 2026-02-05 09:21:42 +01:00
BUG/MEDIUM: buffer: one byte miss in buffer free space check
Space is not avalaible only if the end of the data inserted is strictly greater than the end of buffer. If these two value are equal, the space is avamaible.
This commit is contained in:
parent
463119ccc1
commit
fdda6777bf
@ -75,7 +75,7 @@ int buffer_replace2(struct buffer *b, char *pos, char *end, const char *str, int
|
||||
|
||||
delta = len - (end - pos);
|
||||
|
||||
if (bi_end(b) + delta >= b->data + b->size)
|
||||
if (bi_end(b) + delta > b->data + b->size)
|
||||
return 0; /* no space left */
|
||||
|
||||
if (buffer_not_empty(b) &&
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user