mirror of
https://github.com/Mbed-TLS/mbedtls.git
synced 2025-07-29 11:41:15 +03:00
zlib compression/decompression skipped on empty blocks
This commit is contained in:
@ -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 )
|
||||
{
|
||||
|
Reference in New Issue
Block a user