projects
/
haproxy-2.5.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
485da0b
)
MINOR: qpack: do not encode invalid http status code
author
Amaury Denoyelle
<adenoyelle@haproxy.com>
Thu, 30 Sep 2021 12:47:32 +0000
(14:47 +0200)
committer
Amaury Denoyelle
<adenoyelle@haproxy.com>
Fri, 8 Oct 2021 13:28:35 +0000
(15:28 +0200)
Ensure that the HTTP status code is valid before encoding with QPACK. An
error is return if this is not the case.
src/qpack-enc.c
patch
|
blob
|
history
diff --git
a/src/qpack-enc.c
b/src/qpack-enc.c
index
f53de7c
..
4d08836
100644
(file)
--- 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;