]> git.ipfire.org Git - thirdparty/gnutls.git/commitdiff
better length checking in the record layer.
authorNikos Mavrogiannopoulos <nmav@gnutls.org>
Sat, 12 Jan 2002 19:04:16 +0000 (19:04 +0000)
committerNikos Mavrogiannopoulos <nmav@gnutls.org>
Sat, 12 Jan 2002 19:04:16 +0000 (19:04 +0000)
lib/gnutls_alert.h
lib/gnutls_int.h
lib/gnutls_record.c

index bc3247843a4c84984c70930e99e1cc9d041a95fb..869f03fd677a83330363f9442f54790c318f89a8 100644 (file)
@@ -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);
index e68f6799c5f4abe159eba57e72073ad28821788c..855d769fccd8421eca3f1877a5953cafe4fa3775 100644 (file)
@@ -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
 
index 3f846f2a0857346018c7916d2ffd81bdfa8bece8..1e8c3aaba31524a5a52be80ff978018e872955cd 100644 (file)
@@ -35,6 +35,7 @@
 #include "gnutls_record.h"
 #include "gnutls_datum.h"
 #include "ext_max_record.h"
+#include <gnutls_alert.h>
 
 /**
   * gnutls_protocol_get_version - Returns the version of the currently used protocol