From f9b7ca18719640cb079df2c66e13fe5fea4c5f7b Mon Sep 17 00:00:00 2001 From: =?utf8?q?Vladim=C3=ADr=20Kotal?= Date: Fri, 16 Jun 2023 16:25:58 +0200 Subject: [PATCH] return immediately if namemap is NULL Reviewed-by: Dmitry Belyavskiy Reviewed-by: Matt Caswell (Merged from https://github.com/openssl/openssl/pull/21223) (cherry picked from commit 307cd045dccbd9ea589ff47682e39504d79644d4) --- crypto/core_namemap.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/crypto/core_namemap.c b/crypto/core_namemap.c index e2909d71978..25e0eb90ebb 100644 --- a/crypto/core_namemap.c +++ b/crypto/core_namemap.c @@ -137,6 +137,9 @@ int ossl_namemap_doall_names(const OSSL_NAMEMAP *namemap, int number, cbdata.number = number; cbdata.found = 0; + if (namemap == NULL) + return 0; + /* * We collect all the names first under a read lock. Subsequently we call * the user function, so that we're not holding the read lock when in user -- 2.47.2