From f012f75b2ed64fe9955b1dc2013c06e054bafd7f Mon Sep 17 00:00:00 2001 From: Simon Ruderich Date: Fri, 9 Aug 2013 20:49:19 +0200 Subject: [PATCH 1/1] Check for EOF while reading the HTTP request. --- src/connection.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/connection.c b/src/connection.c index 2b0f5d5..c91eae3 100644 --- a/src/connection.c +++ b/src/connection.c @@ -571,6 +571,8 @@ static int read_http_request(FILE *client_fd, char *request, size_t length) { if (ferror(client_fd)) { LOG_PERROR(WARNING, "read_http_request(): fgets()"); return -1; + } else if (feof(client_fd)) { + return -2; } if (global_http_digest_authorization != NULL && !found_proxy_authorization) { -- 2.45.2