From f0e39acb58990d7fe659770674261cd6829bdc02 Mon Sep 17 00:00:00 2001 From: Paul Bakker Date: Thu, 15 Aug 2013 11:40:48 +0200 Subject: [PATCH] Fixed unitialized n when resuming a session --- library/ssl_srv.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/library/ssl_srv.c b/library/ssl_srv.c index 0dbcdb5ed..9ae25f5f7 100644 --- a/library/ssl_srv.c +++ b/library/ssl_srv.c @@ -1484,7 +1484,7 @@ static int ssl_write_server_hello( ssl_context *ssl ) } else { - ssl->session_negotiate->length = 0; + ssl->session_negotiate->length = n = 0; memset( ssl->session_negotiate->id, 0, 32 ); } #else @@ -1499,6 +1499,7 @@ static int ssl_write_server_hello( ssl_context *ssl ) /* * Resuming a session */ + n = ssl->session_negotiate->length; ssl->state = SSL_SERVER_CHANGE_CIPHER_SPEC; if( ( ret = ssl_derive_keys( ssl ) ) != 0 )