Module: kamailio
Branch: master
Commit: f6f9d90ada963b53b6552e1a172b8f2fd021c33b
URL: 
https://github.com/kamailio/kamailio/commit/f6f9d90ada963b53b6552e1a172b8f2fd021c33b

Author: S-P Chan <shihping.c...@gmail.com>
Committer: S-P Chan <shihping.c...@gmail.com>
Date: 2024-03-05T09:59:41+08:00

tls: NULL safety check

---

Modified: src/modules/tls/tls_mod.c

---

Diff:  
https://github.com/kamailio/kamailio/commit/f6f9d90ada963b53b6552e1a172b8f2fd021c33b.diff
Patch: 
https://github.com/kamailio/kamailio/commit/f6f9d90ada963b53b6552e1a172b8f2fd021c33b.patch

---

diff --git a/src/modules/tls/tls_mod.c b/src/modules/tls/tls_mod.c
index 6dfde00c93a..b4a2afb7818 100644
--- a/src/modules/tls/tls_mod.c
+++ b/src/modules/tls/tls_mod.c
@@ -871,6 +871,8 @@ EVP_PKEY *tls_engine_private_key(const char *key_id)
 
        while(!(OSSL_STORE_eof(ctx))) {
                OSSL_STORE_INFO *info = OSSL_STORE_load(ctx);
+               if(info == NULL)
+                       continue;
 
                int type;
                type = OSSL_STORE_INFO_get_type(info);

_______________________________________________
Kamailio (SER) - Development Mailing List
To unsubscribe send an email to sr-dev-le...@lists.kamailio.org

Reply via email to