From abf2f8fcf9f616d0dad81c89bb31e24ffaef9174 Mon Sep 17 00:00:00 2001 From: Paul Bakker Date: Sun, 30 Jun 2013 14:57:46 +0200 Subject: [PATCH] zlib compression/decompression skipped on empty blocks --- ChangeLog | 1 + library/ssl_tls.c | 6 ++++++ 2 files changed, 7 insertions(+) diff --git a/ChangeLog b/ChangeLog index 66a5c9cd2..4a02d1fc9 100644 --- a/ChangeLog +++ b/ChangeLog @@ -25,6 +25,7 @@ Changes Bugfix * Fixed parse error in ssl_parse_certificate_request() + * zlib compression/decompression skipped on empty blocks = Version 1.2.8 released 2013-06-19 Features diff --git a/library/ssl_tls.c b/library/ssl_tls.c index 139aea96f..62d8d555d 100644 --- a/library/ssl_tls.c +++ b/library/ssl_tls.c @@ -1296,6 +1296,9 @@ static int ssl_compress_buf( ssl_context *ssl ) 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 @@ static int ssl_decompress_buf( ssl_context *ssl ) SSL_DEBUG_MSG( 2, ( "=> decompress buf" ) ); + if( len_pre == 0 ) + return( 0 ); + msg_pre = (unsigned char*) malloc( len_pre ); if( msg_pre == NULL ) {