mirror of
https://git.haproxy.org/git/haproxy.git/
synced 2026-05-04 20:46:11 +02:00
BUG/MEDIUM: httpclient/cli: free of unallocated hc->req.uri
httpclient_new() sets the hc->req.uri ist without duplicating its memory, which is a problem since the string in the ist could be inaccessible at some point. The API was made to use a ist which was allocated dynamically, but httpclient_new() didn't do that, which result in a crash when calling istfree(). This patch fixes the problem by doing an istdup() Fix issue #1452.
This commit is contained in:
parent
a68a00fe28
commit
67b778418e
@ -535,7 +535,7 @@ struct httpclient *httpclient_new(void *caller, enum http_meth_t meth, struct is
|
||||
goto err;
|
||||
|
||||
hc->caller = caller;
|
||||
hc->req.url = url;
|
||||
hc->req.url = istdup(url);
|
||||
hc->req.meth = meth;
|
||||
|
||||
return hc;
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user