zlib compression/decompression skipped on empty blocks
diff --git a/library/ssl_tls.c b/library/ssl_tls.c
index 139aea9..62d8d55 100644
--- a/library/ssl_tls.c
+++ b/library/ssl_tls.c
@@ -1296,6 +1296,9 @@
SSL_DEBUG_MSG( 2, ( "=> compress buf" ) );
+ if( len_pre == 0 )
+ return( 0 );
+
msg_pre = (unsigned char*) malloc( len_pre );
if( msg_pre == NULL )
{
@@ -1347,6 +1350,9 @@
SSL_DEBUG_MSG( 2, ( "=> decompress buf" ) );
+ if( len_pre == 0 )
+ return( 0 );
+
msg_pre = (unsigned char*) malloc( len_pre );
if( msg_pre == NULL )
{