diff options
Diffstat (limited to 'src')
| -rw-r--r-- | src/lib/libcrypto/evp/evp_names.c | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/src/lib/libcrypto/evp/evp_names.c b/src/lib/libcrypto/evp/evp_names.c index 1b976ca05f..d1e21d2793 100644 --- a/src/lib/libcrypto/evp/evp_names.c +++ b/src/lib/libcrypto/evp/evp_names.c | |||
| @@ -1,4 +1,4 @@ | |||
| 1 | /* $OpenBSD: evp_names.c,v 1.14 2024/03/24 06:15:59 tb Exp $ */ | 1 | /* $OpenBSD: evp_names.c,v 1.15 2024/03/24 13:56:35 jca Exp $ */ |
| 2 | /* | 2 | /* |
| 3 | * Copyright (c) 2023 Theo Buehler <tb@openbsd.org> | 3 | * Copyright (c) 2023 Theo Buehler <tb@openbsd.org> |
| 4 | * | 4 | * |
| @@ -1643,6 +1643,9 @@ EVP_get_cipherbyname(const char *name) | |||
| 1643 | if (!OPENSSL_init_crypto(0, NULL)) | 1643 | if (!OPENSSL_init_crypto(0, NULL)) |
| 1644 | return NULL; | 1644 | return NULL; |
| 1645 | 1645 | ||
| 1646 | if (name == NULL) | ||
| 1647 | return NULL; | ||
| 1648 | |||
| 1646 | if ((cipher = bsearch(name, cipher_names, N_CIPHER_NAMES, | 1649 | if ((cipher = bsearch(name, cipher_names, N_CIPHER_NAMES, |
| 1647 | sizeof(*cipher), cipher_cmp)) == NULL) | 1650 | sizeof(*cipher), cipher_cmp)) == NULL) |
| 1648 | return NULL; | 1651 | return NULL; |
| @@ -1664,6 +1667,9 @@ EVP_get_digestbyname(const char *name) | |||
| 1664 | if (!OPENSSL_init_crypto(0, NULL)) | 1667 | if (!OPENSSL_init_crypto(0, NULL)) |
| 1665 | return NULL; | 1668 | return NULL; |
| 1666 | 1669 | ||
| 1670 | if (name == NULL) | ||
| 1671 | return NULL; | ||
| 1672 | |||
| 1667 | if ((digest = bsearch(name, digest_names, N_DIGEST_NAMES, | 1673 | if ((digest = bsearch(name, digest_names, N_DIGEST_NAMES, |
| 1668 | sizeof(*digest), digest_cmp)) == NULL) | 1674 | sizeof(*digest), digest_cmp)) == NULL) |
| 1669 | return NULL; | 1675 | return NULL; |
