From: Simon Ruderich Date: Thu, 8 Aug 2013 20:13:57 +0000 (+0200) Subject: Add missing cast. X-Git-Url: https://ruderich.org/simon/gitweb/?a=commitdiff_plain;h=f651ef2c2de363f834af1bfad7b240a9c73a602c;p=tlsproxy%2Ftlsproxy.git Add missing cast. --- diff --git a/src/tlsproxy.c b/src/tlsproxy.c index 8b9b6d9..1ccee20 100644 --- a/src/tlsproxy.c +++ b/src/tlsproxy.c @@ -24,6 +24,7 @@ #include "connection.h" #include +#include #include #include #include @@ -31,6 +32,7 @@ #include #include #include +#include #if GNUTLS_VERSION_NUMBER <= 0x020b00 /* Necessary for GnuTLS when used with threads. */ @@ -422,7 +424,8 @@ static void initialize_gnutls(void) { exit(EXIT_FAILURE); } dh_parameters_datum.data = (unsigned char *)dh_parameters; - dh_parameters_datum.size = strlen(dh_parameters); + assert(strlen(dh_parameters) <= UINT_MAX); + dh_parameters_datum.size = (unsigned int)(strlen(dh_parameters)); result = gnutls_dh_params_init(&global_tls_dh_params); GNUTLS_ERROR_EXIT(result, "gnutls_dh_params_init()");