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:
ed66b0f
)
BUG/MINOR: hq-interop: fix potential NULL dereference
author
Amaury Denoyelle
<adenoyelle@haproxy.com>
Thu, 18 Nov 2021 13:40:26 +0000
(14:40 +0100)
committer
Amaury Denoyelle
<adenoyelle@haproxy.com>
Fri, 19 Nov 2021 14:10:46 +0000
(15:10 +0100)
Test return from htx_add_stline() and returns an error if NULL.
src/hq_interop.c
patch
|
blob
|
history
diff --git
a/src/hq_interop.c
b/src/hq_interop.c
index
0f878f0
..
075e785
100644
(file)
--- a/
src/hq_interop.c
+++ b/
src/hq_interop.c
@@
-38,6
+38,9
@@
static int hq_interop_decode_qcs(struct qcs *qcs, void *ctx)
path.len = ptr - path.ptr;
sl = htx_add_stline(htx, HTX_BLK_REQ_SL, 0, ist("GET"), path, ist("HTTP/1.0"));
+ if (!sl)
+ return -1;
+
sl->flags |= HTX_SL_F_BODYLESS;
sl->info.req.meth = find_http_meth("GET", 3);