From: Willy Tarreau Date: Sun, 3 Dec 2017 18:02:28 +0000 (+0100) Subject: BUG/MINOR: h2: do not accept SETTINGS_ENABLE_PUSH other than 0 or 1 X-Git-Tag: v1.9-dev1~617 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=1b38b46ab7c88d79e89e31cf8d22cd346c97d3ae;p=thirdparty%2Fhaproxy.git BUG/MINOR: h2: do not accept SETTINGS_ENABLE_PUSH other than 0 or 1 We don't use yet it but for correctness, let's enforce the check. To backport to 1.8. --- diff --git a/src/mux_h2.c b/src/mux_h2.c index 28c5eb7060..771a3e6022 100644 --- a/src/mux_h2.c +++ b/src/mux_h2.c @@ -1102,6 +1102,12 @@ static int h2c_handle_settings(struct h2c *h2c) } h2c->mfs = arg; break; + case H2_SETTINGS_ENABLE_PUSH: + if (arg < 0 || arg > 1) { // RFC7540#6.5.2 + error = H2_ERR_PROTOCOL_ERROR; + goto fail; + } + break; } }