From bf85ef1b60d03c76e85ec06be3999ead4533f092 Mon Sep 17 00:00:00 2001 From: Matt Caswell Date: Wed, 2 Nov 2016 11:15:08 +0000 Subject: [PATCH] Ensure that vent->smeth != NULL before we call vent->smeth() We can end up with a NULL SSL_METHOD function if a method has been disabled. If that happens then we shouldn't call vent->smeth(). Reviewed-by: Rich Salz --- ssl/statem/statem_lib.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ssl/statem/statem_lib.c b/ssl/statem/statem_lib.c index 2aadc77a77..c05f645d87 100644 --- a/ssl/statem/statem_lib.c +++ b/ssl/statem/statem_lib.c @@ -1053,7 +1053,7 @@ int ssl_choose_server_version(SSL *s, CLIENTHELLO_MSG *hello) vent->version != 0 && vent->version != (int)candidate_vers; ++vent) ; - if (vent->version != 0) { + if (vent->version != 0 && vent->smeth != NULL) { const SSL_METHOD *method; method = vent->smeth(); -- 2.25.1