From: Amaury Denoyelle Date: Thu, 30 Sep 2021 12:47:32 +0000 (+0200) Subject: MINOR: qpack: do not encode invalid http status code X-Git-Tag: v2.5-dev9~35 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=fccffe08b39a877e974b5150f325b0f8ade4d61a;p=thirdparty%2Fhaproxy.git MINOR: qpack: do not encode invalid http status code Ensure that the HTTP status code is valid before encoding with QPACK. An error is return if this is not the case. --- diff --git a/src/qpack-enc.c b/src/qpack-enc.c index f53de7cb50..4d08836e0d 100644 --- a/src/qpack-enc.c +++ b/src/qpack-enc.c @@ -54,6 +54,9 @@ int qpack_encode_int_status(struct buffer *out, unsigned int status) { int status_size, idx = 0; + if (status < 100 || status > 599) + return 1; + switch (status) { case 103: idx = 24; break; case 200: idx = 25; break;