From 7a5927568889f3f895af9964e06be9471f8a29b1 Mon Sep 17 00:00:00 2001 From: Takashi Kojo Date: Sat, 16 Dec 2017 09:03:44 +0900 Subject: [PATCH] add arg check, wolfSSL_CTX_clear_options --- src/ssl.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/ssl.c b/src/ssl.c index f18781668..49bb5eb24 100644 --- a/src/ssl.c +++ b/src/ssl.c @@ -11494,6 +11494,8 @@ int wolfSSL_set_compression(WOLFSSL* ssl) long wolfSSL_CTX_clear_options(WOLFSSL_CTX* ctx, long opt) { WOLFSSL_ENTER("SSL_CTX_clear_options"); + if(ctx == NULL) + return BAD_FUNC_ARG; ctx->mask &= ~opt; return ctx->mask; }