mirror of
https://github.com/libevent/libevent.git
synced 2025-01-31 09:12:55 +08:00
Add a forgotten NULL check to evhttp_parse_headers
Issue detected by the clang static analyzer
This commit is contained in:
parent
ad9ff5834a
commit
12311ff46e
3
http.c
3
http.c
@ -1777,7 +1777,8 @@ evhttp_parse_headers(struct evhttp_request *req, struct evbuffer* buffer)
|
||||
}
|
||||
|
||||
if (status == MORE_DATA_EXPECTED) {
|
||||
if (req->headers_size + evbuffer_get_length(buffer) > req->evcon->max_headers_size)
|
||||
if (req->evcon != NULL &&
|
||||
req->headers_size + evbuffer_get_length(buffer) > req->evcon->max_headers_size)
|
||||
return (DATA_TOO_LONG);
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user