From fef071f888426e86a265ec6a778f58a007a55ea0 Mon Sep 17 00:00:00 2001 From: Nikos Mavrogiannopoulos Date: Sat, 12 Jan 2002 19:04:16 +0000 Subject: better length checking in the record layer. --- lib/gnutls_alert.h | 2 +- lib/gnutls_int.h | 3 ++- lib/gnutls_record.c | 1 + 3 files changed, 4 insertions(+), 2 deletions(-) diff --git a/lib/gnutls_alert.h b/lib/gnutls_alert.h index bc3247843a..869f03fd67 100644 --- a/lib/gnutls_alert.h +++ b/lib/gnutls_alert.h @@ -1,2 +1,2 @@ AlertDescription gnutls_alert_get_last( GNUTLS_STATE state); -int gnutls_send_alert( GNUTLS_STATE state, AlertLevel level, AlertDescription desc); +int gnutls_alert_send( GNUTLS_STATE state, AlertLevel level, AlertDescription desc); diff --git a/lib/gnutls_int.h b/lib/gnutls_int.h index e68f6799c5..855d769fcc 100644 --- a/lib/gnutls_int.h +++ b/lib/gnutls_int.h @@ -80,7 +80,8 @@ typedef const int* GNUTLS_LIST; #define DEFAULT_MAX_RECORD_SIZE 16384 #define RECORD_HEADER_SIZE 5 #define MAX_RECORD_SIZE state->security_parameters.max_record_size -#define MAX_RECV_SIZE 2048+MAX_RECORD_SIZE+RECORD_HEADER_SIZE /* 2^14+2048+RECORD_HEADER_SIZE */ +#define MAX_PAD_SIZE 255 +#define MAX_RECV_SIZE 2048+MAX_PAD_SIZE+MAX_RECORD_SIZE+RECORD_HEADER_SIZE /* MAX_RECORD_SIZE+MAX_PAD+2048+RECORD_HEADER_SIZE */ #define HANDSHAKE_HEADER_SIZE 4 diff --git a/lib/gnutls_record.c b/lib/gnutls_record.c index 3f846f2a08..1e8c3aaba3 100644 --- a/lib/gnutls_record.c +++ b/lib/gnutls_record.c @@ -35,6 +35,7 @@ #include "gnutls_record.h" #include "gnutls_datum.h" #include "ext_max_record.h" +#include /** * gnutls_protocol_get_version - Returns the version of the currently used protocol -- cgit v1.2.1