mirror of
http://git.haproxy.org/git/haproxy.git/
synced 2025-04-01 22:48:25 +00:00
BUG/MEDIUM: channel: bo_getline() must wait for \n until buffer is full
We must not report incomplete data if the buffer is not full, otherwise we can abort some processing on the stats socket when dealing with massive amounts of commands.
This commit is contained in:
parent
b5e7ef6810
commit
82de2b644e
@ -230,7 +230,8 @@ int bo_getline(struct channel *chn, char *str, int len)
|
||||
break;
|
||||
p = buffer_wrap_add(chn->buf, p + 1);
|
||||
}
|
||||
if (ret > 0 && ret < len && ret < chn->buf->o &&
|
||||
if (ret > 0 && ret < len &&
|
||||
(ret < chn->buf->o || !channel_full(chn)) &&
|
||||
*(str-1) != '\n' &&
|
||||
!(chn->flags & (CF_SHUTW|CF_SHUTW_NOW)))
|
||||
ret = 0;
|
||||
|
Loading…
Reference in New Issue
Block a user