diff options
author | Azat Khuzhin <a3at.mail@gmail.com> | 2018-10-22 23:56:50 +0300 |
---|---|---|
committer | Azat Khuzhin <a3at.mail@gmail.com> | 2018-10-22 23:56:50 +0300 |
commit | 64ead341a021a42084bb224100dda19311f2ac3e (patch) | |
tree | 238e1e291dfd1d37921fe90095d181714bf5fe7f /http.c | |
parent | 254fbc81b43eb8de42c7723a3f129ac529ebc9f4 (diff) | |
download | libevent-64ead341a021a42084bb224100dda19311f2ac3e.tar.gz |
http: do not try to parse request-line if we do not have enough bytes
Diffstat (limited to 'http.c')
-rw-r--r-- | http.c | 2 |
1 files changed, 2 insertions, 0 deletions
@@ -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, " "); |