#include "connection.h"
#include <arpa/inet.h>
+#include <assert.h>
#include <errno.h>
#include <pthread.h>
#include <signal.h>
#include <sys/stat.h>
#include <sys/types.h>
#include <unistd.h>
+#include <limits.h>
#if GNUTLS_VERSION_NUMBER <= 0x020b00
/* Necessary for GnuTLS when used with threads. */
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()");