Skip to content

Commit

Permalink
http: do not try to parse request-line if we do not have enough bytes
Browse files Browse the repository at this point in the history
  • Loading branch information
azat committed Oct 22, 2018
1 parent 254fbc8 commit 64ead34
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions http.c
Original file line number Diff line number Diff line change
Expand Up @@ -1702,6 +1702,8 @@ evhttp_parse_request_line(struct evhttp_request *req, char *line, size_t len)
--eos;
--len;
}
if (len < strlen("GET / HTTP/1.0"))
return -1;

/* Parse the request line */
method = strsep(&line, " ");
Expand Down

0 comments on commit 64ead34

Please sign in to comment.