From e15029bea9a33cc0f7b392bf136ec2e49b17aba7 Mon Sep 17 00:00:00 2001 From: William Lallemand Date: Mon, 14 Oct 2019 10:46:58 +0200 Subject: [PATCH] BUG/MEDIUM: ssl: NULL dereference in ssl_sock_load_cert_sni() A NULL dereference can occur when inserting SNIs. In the case of checking for duplicates, if there is already several sni_ctx with the same key. Fix issue #321. --- src/ssl_sock.c | 1 + 1 file changed, 1 insertion(+) diff --git a/src/ssl_sock.c b/src/ssl_sock.c index 6a781145b..90df6e7c6 100644 --- a/src/ssl_sock.c +++ b/src/ssl_sock.c @@ -2777,6 +2777,7 @@ static void ssl_sock_load_cert_sni(struct ckch_inst *ckch_inst, struct bind_conf LIST_DEL(&sc0->by_ckch_inst); free(sc0); sc0 = NULL; + break; } }