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:
Thierry FOURNIER 2015-03-10 01:55:01 +01:00 committed by Willy Tarreau
parent 463119ccc1
commit fdda6777bf

View File

@ -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) &&