mirror of
https://github.com/haproxy/haproxy.git
synced 2026-06-08 16:23:24 -04:00
BUG/MEDIUM: qmux: Close connection on invalid frame
In qcc_qmux_recv(), when calling qmux_parse_frm(), also treat negative values as an error, and close the connexion. qmux_parse_frm() will return -1 if the frame is of an invalid type, and we don't want to process any further, or we will crash.
This commit is contained in:
parent
41a20c1738
commit
bda42604c0
1 changed files with 1 additions and 1 deletions
|
|
@ -195,7 +195,7 @@ int qcc_qmux_recv(struct qcc *qcc)
|
|||
buf_rec = b_make(b_orig(buf), b_size(buf),
|
||||
b_head_ofs(buf), qcc->rx.rlen);
|
||||
frm_ret = qmux_parse_frm(qcc, &buf_rec);
|
||||
if (!frm_ret) {
|
||||
if (frm_ret <= 0) {
|
||||
/* TODO implement proper connection closure */
|
||||
conn->flags |= CO_FL_ERROR;
|
||||
goto out;
|
||||
|
|
|
|||
Loading…
Reference in a new issue