Re: [hackers] [quark][PATCH] Don't erase response on http_send_error_response
On Sat, 24 Oct 2020 16:19:13 +0000
José Miguel Sánchez García <soy.jmi2k_AT_gmail.com> wrote:
Dear José,
thanks for taking your time reading the code and reporting this!
> The comment before the offending line indicated it was intended to
> only erase the fields, but it erased the whole response. It was most
> likely a bug.
>
> /* empty all fields */
> - memset(req, 0, sizeof(*req));
> + memset(&(req->fields), 0, sizeof(req->fields));
No, this is supposed to be like this. I agree that the comment is a bit
misleading, but http_parse_header() really builds a request from
scratch and first sets it all to zero. With "fields" I'm referring to
the struct fields in request, and this misleading comment will be fixed
in an upcoming commit.
With best regards
Laslo
Received on Sun Oct 25 2020 - 08:39:31 CET
This archive was generated by hypermail 2.3.0
: Sun Oct 25 2020 - 09:00:32 CET