From 8e8ae3d9617451f9f338b7b22cf8ec55192bf108 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Manuel=20P=C3=A9gouri=C3=A9-Gonnard?= Date: Tue, 23 Jun 2015 18:57:28 +0200 Subject: [PATCH] Fix potential NULL dereference on bad usage --- library/ssl_srv.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/library/ssl_srv.c b/library/ssl_srv.c index f6d014bc5..fc217549d 100644 --- a/library/ssl_srv.c +++ b/library/ssl_srv.c @@ -2595,7 +2595,7 @@ curve_matching_done: curve = ssl->handshake->curves; #endif - if( *curve == NULL ) + if( curve == NULL || *curve == NULL ) { SSL_DEBUG_MSG( 1, ( "no matching curve for ECDHE" ) ); return( POLARSSL_ERR_SSL_NO_CIPHER_CHOSEN );