Skip to content

Commit

Permalink
zlib compression/decompression skipped on empty blocks
Browse files Browse the repository at this point in the history
  • Loading branch information
Paul Bakker committed Jun 30, 2013
1 parent e5bffc3 commit abf2f8f
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 0 deletions.
1 change: 1 addition & 0 deletions ChangeLog
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
6 changes: 6 additions & 0 deletions library/ssl_tls.c
Original file line number Diff line number Diff line change
Expand Up @@ -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 )
{
Expand Down Expand Up @@ -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 )
{
Expand Down

0 comments on commit abf2f8f

Please sign in to comment.