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.
This commit is contained in:
Amaury Denoyelle 2021-09-30 14:47:32 +02:00
parent 485da0b053
commit fccffe08b3

View File

@ -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;