From 324ade51e168f28430f4429849becd0f08d507c0 Mon Sep 17 00:00:00 2001 From: Jouni Malinen Date: Mon, 28 Dec 2015 18:31:11 +0200 Subject: [PATCH] TLS: Make tls_cert_chain_failure_event() more robust Explicitly check for the failure event to include a certificate before trying to build the event. Signed-off-by: Jouni Malinen --- src/tls/tlsv1_client_read.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/tls/tlsv1_client_read.c b/src/tls/tlsv1_client_read.c index 89ef196de..244c3cb06 100644 --- a/src/tls/tlsv1_client_read.c +++ b/src/tls/tlsv1_client_read.c @@ -326,7 +326,7 @@ static void tls_cert_chain_failure_event(struct tlsv1_client *conn, int depth, union tls_event_data ev; char subject[128]; - if (!conn->event_cb) + if (!conn->event_cb || !cert) return; os_memset(&ev, 0, sizeof(ev));