mirror of
http://git.haproxy.org/git/haproxy.git/
synced 2024-12-19 10:14:41 +00:00
BUG/MINOR: hq-interop: fix potential NULL dereference
Test return from htx_add_stline() and returns an error if NULL.
This commit is contained in:
parent
ed66b0f04a
commit
b48c59a5a3
@ -38,6 +38,9 @@ static int hq_interop_decode_qcs(struct qcs *qcs, void *ctx)
|
|||||||
path.len = ptr - path.ptr;
|
path.len = ptr - path.ptr;
|
||||||
|
|
||||||
sl = htx_add_stline(htx, HTX_BLK_REQ_SL, 0, ist("GET"), path, ist("HTTP/1.0"));
|
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->flags |= HTX_SL_F_BODYLESS;
|
||||||
sl->info.req.meth = find_http_meth("GET", 3);
|
sl->info.req.meth = find_http_meth("GET", 3);
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user