X-Git-Url: https://ruderich.org/simon/gitweb/?p=tlsproxy%2Ftlsproxy.git;a=blobdiff_plain;f=src%2Fconnection.c;h=2875b768b90ccf71714d03124f41c0de9fbe721c;hp=b7b9d683d6e6840af314dc2d87a4a049f06aa050;hb=780dee36f7c90cc505a64a8b4489dc1fbdeeb42a;hpb=5ca1b3118da58c669b3bbf6d8e198cc2fe3d9b81 diff --git a/src/connection.c b/src/connection.c index b7b9d68..2875b76 100644 --- a/src/connection.c +++ b/src/connection.c @@ -23,6 +23,7 @@ #include #include +#include #include #include #include @@ -528,6 +529,7 @@ static int read_http_request(FILE *client_fd, char *request, size_t length) { char buffer[MAX_REQUEST_LINE]; int found_proxy_authorization; + assert(length <= INT_MAX); if (fgets(request, (int)length, client_fd) == NULL) { if (ferror(client_fd)) { LOG_PERROR(WARNING, "read_http_request(): fgets()");