From fb21f7d0e60ce17fa8fbdcd4e981789cbc7bcd98 Mon Sep 17 00:00:00 2001 From: Aaron Thompson Date: Fri, 3 Apr 2020 05:42:26 +0000 Subject: [PATCH] Fix a segfault when a PKCS#11 token is not found. (cherry picked from commit 541d7bafe652c03b14cd9844bfeea371de161e5b) --- lib/isc/pk11.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/lib/isc/pk11.c b/lib/isc/pk11.c index ede9748977..7841c4957f 100644 --- a/lib/isc/pk11.c +++ b/lib/isc/pk11.c @@ -646,6 +646,9 @@ pk11_get_best_token(pk11_optype_t optype) { token = best_eddsa_token; break; default: + break; + } + if (token == NULL) { return (0); } return (token->slotid);