]> git.ipfire.org Git - thirdparty/bind9.git/commitdiff
Fix a segfault when a PKCS#11 token is not found.
authorAaron Thompson <dev@aaront.org>
Fri, 3 Apr 2020 05:42:26 +0000 (05:42 +0000)
committerOndřej Surý <ondrej@isc.org>
Fri, 1 May 2020 04:54:26 +0000 (06:54 +0200)
(cherry picked from commit 541d7bafe652c03b14cd9844bfeea371de161e5b)

lib/isc/pk11.c

index ede974897718f70624992594ff256be33bf1f911..7841c4957fa23e59d67b2af27a09fc05ec864d64 100644 (file)
@@ -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);