mirror of
https://github.com/haproxy/haproxy.git
synced 2026-04-22 14:49:45 -04:00
[BUG] buffers: remove remains of wrong obsolete length check
A check was performed in buffer_replace2() to compare buffer length with its read pointer. This has been wrong for a long time, though it only has an impact when dealing with keep-alive requests/responses. In theory this should be backported but the check has no impact without keep-alive.
This commit is contained in:
parent
a5aa1c86a5
commit
43a7e6620b
1 changed files with 0 additions and 6 deletions
|
|
@ -230,12 +230,6 @@ int buffer_replace2(struct buffer *b, char *pos, char *end, const char *str, int
|
|||
if (delta + b->r >= b->data + b->size)
|
||||
return 0; /* no space left */
|
||||
|
||||
if (b->data + b->l < end) {
|
||||
/* The data has been stolen, we could have crashed.
|
||||
* Maybe we should abort() ? */
|
||||
return 0;
|
||||
}
|
||||
|
||||
/* first, protect the end of the buffer */
|
||||
memmove(end + delta, end, b->r - end);
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue