From: Nick Mathewson Date: Tue, 7 Dec 2010 16:45:14 +0000 (-0500) Subject: Fix a signed/unsigned comparison in the last commit X-Git-Tag: release-2.0.10-stable~9 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=7011f9ec1f96f8fa2939beec685e292c57e5addf;p=libevent Fix a signed/unsigned comparison in the last commit --- diff --git a/http.c b/http.c index 70de30ac..f56d6368 100644 --- a/http.c +++ b/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 now, just optimistically tell the client to 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, NULL); return;