From f651ef2c2de363f834af1bfad7b240a9c73a602c Mon Sep 17 00:00:00 2001 From: Simon Ruderich Date: Thu, 8 Aug 2013 22:13:57 +0200 Subject: [PATCH] Add missing cast. --- src/tlsproxy.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) 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()"); -- 2.45.2