From: Christopher Faulet Date: Tue, 3 Sep 2019 14:26:15 +0000 (+0200) Subject: BUG/MINOR: mux-h1: Don't stop anymore input processing when the max is reached X-Git-Tag: v2.1-dev2~117 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=6b32192cfb9df18de4fe3180e272ea88c0d8c1ff;p=thirdparty%2Fhaproxy.git BUG/MINOR: mux-h1: Don't stop anymore input processing when the max is reached The loop is now stopped only when nothing else is consumed from the input buffer or if a parsing error is encountered. This will let a chance to detect cases when we fail to add the EOM. For instance, when the max is reached after the headers parsing and all the message is received. In this case, we may have the flag H1S_F_REOS set without the flag H1S_F_APPEND_EOM and no pending input data, leading to an error because we think it is an abort. This patch must be backported to 2.0. This bug does not affect 1.9. --- diff --git a/src/mux_h1.c b/src/mux_h1.c index 24bd93be31..90fb9e6f9c 100644 --- a/src/mux_h1.c +++ b/src/mux_h1.c @@ -1496,7 +1496,7 @@ static size_t h1_process_input(struct h1c *h1c, struct buffer *buf, size_t count } count -= htx_used_space(htx) - used; - } while (!(h1s->flags & errflag) && count); + } while (!(h1s->flags & errflag)); if (h1s->flags & errflag) goto parsing_err;