Commit 3207f0da authored by Nils Goroll's avatar Nils Goroll

vtest: handle empty headers when reading the response

vtest would segfault due to a null pointer access on empty
headers
parent dee47cc4
......@@ -706,6 +706,8 @@ cmd_http_rxresp(CMD_ARGS)
"Multiple Content-Length headers.\n");
if (!has_obj)
return;
if (!hp->resp[0] || !hp->resp[1])
return;
else if (!strcmp(hp->resp[1], "200"))
http_swallow_body(hp, hp->resp, 1, 0);
else
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment