From: "Julian Ospald (hasufell)" <hasufell@gentoo.org>
To: gentoo-commits@lists.gentoo.org
Subject: [gentoo-commits] gentoo-x86 commit in net-libs/polarssl/files: polarssl-1.3.8-ssl_pthread_server.patch
Date: Fri, 11 Jul 2014 23:52:08 +0000 (UTC) [thread overview]
Message-ID: <20140711235208.4574B2004F@flycatcher.gentoo.org> (raw)
hasufell 14/07/11 23:52:08
Added: polarssl-1.3.8-ssl_pthread_server.patch
Log:
version bump
(Portage version: 2.2.10/cvs/Linux x86_64, signed Manifest commit with key BDEED020)
Revision Changes Path
1.1 net-libs/polarssl/files/polarssl-1.3.8-ssl_pthread_server.patch
file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/net-libs/polarssl/files/polarssl-1.3.8-ssl_pthread_server.patch?rev=1.1&view=markup
plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/net-libs/polarssl/files/polarssl-1.3.8-ssl_pthread_server.patch?rev=1.1&content-type=text/plain
Index: polarssl-1.3.8-ssl_pthread_server.patch
===================================================================
diff --git a/programs/ssl/ssl_pthread_server.c b/programs/ssl/ssl_pthread_server.c
index cc6ad89..019e4e8 100644
--- a/programs/ssl/ssl_pthread_server.c
+++ b/programs/ssl/ssl_pthread_server.c
@@ -129,6 +129,10 @@ static void *handle_ssl_connection( void *data )
ssl_context ssl;
ctr_drbg_context ctr_drbg;
+ /* Make sure memory references are valid */
+ memset( &ssl, 0, sizeof( ssl_context ) );
+ memset( &ctr_drbg, 0, sizeof( ctr_drbg_context ) );
+
snprintf( pers, sizeof(pers), "SSL Pthread Thread %d", thread_id );
printf( " [ #%d ] Client FD %d\n", thread_id, client_fd );
printf( " [ #%d ] Seeding the random number generator...\n", thread_id );
@@ -176,7 +180,7 @@ static void *handle_ssl_connection( void *data )
if( ( ret = ssl_set_own_cert( &ssl, thread_info->server_cert, thread_info->server_key ) ) != 0 )
{
printf( " failed\n ! ssl_set_own_cert returned %d\n\n", ret );
- goto exit;
+ goto thread_exit;
}
printf( " [ #%d ] ok\n", thread_id );
@@ -308,6 +312,7 @@ thread_exit:
#endif
net_close( client_fd );
+ ctr_drbg_free( &ctr_drbg );
ssl_free( &ssl );
thread_info->thread_complete = 1;
@@ -492,7 +497,6 @@ exit:
#if defined(POLARSSL_SSL_CACHE_C)
ssl_cache_free( &cache );
#endif
- ctr_drbg_free( &ctr_drbg );
entropy_free( &entropy );
polarssl_mutex_free( &debug_mutex );
reply other threads:[~2014-07-11 23:52 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20140711235208.4574B2004F@flycatcher.gentoo.org \
--to=hasufell@gentoo.org \
--cc=gentoo-commits@lists.gentoo.org \
--cc=gentoo-dev@lists.gentoo.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox