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