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.
(cherry picked from commit 8fae1e140a0bfc80666c41ce55255000c1fad440)
Signed-off-by: Pierre Ynard <linkfanel@yahoo.fr>
Showing
Please register or sign in to comment