Commit 8fae1e14 authored by Pierre Ynard's avatar Pierre Ynard

httpd: fix parsing of request body

This caused genuine bugs like mangled bodies and corrupted requests
(usually leading to 501 errors), and possibly leaks of memory buffer
of the size of the Content-Length parameter. This is pretty bad since
crafted requests could easily exhaust the memory and/or trigger a crash.
Apart from the contents of the buffer of the involved request, there
doesn't seem to be any possible memory corruption.
parent 4c87b90b
......@@ -1834,6 +1834,7 @@ static void httpd_ClientRecv( httpd_client_t *cl )
* mark the end of the body (probably only RTSP) */
cl->query.p_body = xmalloc( cl->query.i_body );
cl->i_buffer = 0;
break;
}
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