X-Git-Url: https://ruderich.org/simon/gitweb/?a=blobdiff_plain;f=src%2Fconnection.c;h=700a3548345398a436aaf9a26b5144714e85f230;hb=76ad95f5a7601b7e0549a4f4624443287f64a262;hp=0a69f78b228e1b4e64af911bdd4fe8ace64f1fbf;hpb=ceebf9e917885f33396b93504943d7b8e63e782b;p=tlsproxy%2Ftlsproxy.git diff --git a/src/connection.c b/src/connection.c index 0a69f78..700a354 100644 --- a/src/connection.c +++ b/src/connection.c @@ -357,7 +357,7 @@ static int initialize_tls_session_client(int peer_socket, /* The "invalid" hostname is special. If it's used we send an invalid * certificate to let the client know something is wrong. */ - use_invalid_cert = 0 == strcmp(hostname, "invalid"); + use_invalid_cert = (0 == strcmp(hostname, "invalid")); if (0 != proxy_certificate_path(hostname, path, sizeof(path))) { LOG(LOG_ERROR, @@ -512,7 +512,7 @@ static int read_http_request(FILE *client_fd, char *request, size_t length) { return -2; } - while (NULL != fgets(buffer, MAX_REQUEST_LINE, client_fd)) { + while (NULL != fgets(buffer, sizeof(buffer), client_fd)) { /* End of header. */ if (0 == strcmp(buffer, "\n") || 0 == strcmp(buffer, "\r\n")) { break;