diff --git a/ChangeLog b/ChangeLog index aef4d6a88..e7e2a7106 100644 --- a/ChangeLog +++ b/ChangeLog @@ -33,6 +33,8 @@ Bugfix * Fixed CMake symlinking on out-of-source builds * Bignum's MIPS-32 assembly was used on MIPS-64, causing chaos. (Found by Alex Wilson.) + * ssl_init() was leaving a dirty pointer in ssl_context if malloc of + out_ctr failed = Version 1.2.10 released 2013-10-07 Changes diff --git a/library/ssl_tls.c b/library/ssl_tls.c index c42ecccf6..4704b4416 100644 --- a/library/ssl_tls.c +++ b/library/ssl_tls.c @@ -3051,6 +3051,7 @@ int ssl_init( ssl_context *ssl ) { SSL_DEBUG_MSG( 1, ( "malloc(%d bytes) failed", len ) ); free( ssl-> in_ctr ); + ssl->in_ctr = NULL; return( POLARSSL_ERR_SSL_MALLOC_FAILED ); }