mirror of
https://github.com/cuberite/libevent.git
synced 2025-09-10 13:04:23 -04:00
Fix a signed/unsigned comparison in the last commit
This commit is contained in:
parent
d23839fc6e
commit
7011f9ec1f
3
http.c
3
http.c
@ -1846,7 +1846,8 @@ evhttp_get_body(struct evhttp_connection *evcon, struct evhttp_request *req)
|
|||||||
no, we should respond with an error. For
|
no, we should respond with an error. For
|
||||||
now, just optimistically tell the client to
|
now, just optimistically tell the client to
|
||||||
send their message body. */
|
send their message body. */
|
||||||
if (req->ntoread > req->evcon->max_body_size) {
|
if (req->ntoread > 0 &&
|
||||||
|
(size_t)req->ntoread > req->evcon->max_body_size) {
|
||||||
evhttp_send_error(req, HTTP_ENTITYTOOLARGE,
|
evhttp_send_error(req, HTTP_ENTITYTOOLARGE,
|
||||||
NULL);
|
NULL);
|
||||||
return;
|
return;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user