Introduce macro RECORD_LAYER_setup_comp_buffer
[openssl.git] / ssl / record / ssl3_record.c
index a1f3c56b58a610b1c6d3510500b7982cbadcff2d..33feb01c576bc6574ad40d068261948909636625 100644 (file)
@@ -143,10 +143,11 @@ void SSL3_RECORD_release(SSL3_RECORD *r)
     r->comp = NULL;
 }
 
-int SSL3_RECORD_setup(SSL3_RECORD *r, size_t len)
+int SSL3_RECORD_setup(SSL3_RECORD *r)
 {
     if (r->comp == NULL)
-        r->comp = (unsigned char *) OPENSSL_malloc(len);
+        r->comp = (unsigned char *)
+            OPENSSL_malloc(SSL3_RT_MAX_ENCRYPTED_LENGTH);
     if (r->comp == NULL)
         return 0;
     return 1;