[sr-dev] git:5.5:93dc038f: async: safety check for async ms list

Daniel-Constantin Mierla miconda at gmail.com
Tue Jun 1 11:09:29 CEST 2021


Module: kamailio
Branch: 5.5
Commit: 93dc038f3f1f854b1e0987ec28e49d8a70293e19
URL: https://github.com/kamailio/kamailio/commit/93dc038f3f1f854b1e0987ec28e49d8a70293e19

Author: Daniel-Constantin Mierla <miconda at gmail.com>
Committer: Daniel-Constantin Mierla <miconda at gmail.com>
Date: 2021-06-01T10:59:16+02:00

async: safety check for async ms list

(cherry picked from commit 5b0e74c1832d2d09fe36424e1e1aaaacde920b31)

---

Modified: src/modules/async/async_sleep.c

---

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

---

diff --git a/src/modules/async/async_sleep.c b/src/modules/async/async_sleep.c
index 1e81d3318c..bd17b0e1d9 100644
--- a/src/modules/async/async_sleep.c
+++ b/src/modules/async/async_sleep.c
@@ -370,6 +370,10 @@ int async_ms_sleep(sip_msg_t *msg, int milliseconds, cfg_action_t *act, str *cbn
 	async_task_param_t *atp;
 	async_task_t *at;
 
+	if (_async_ms_list==NULL) {
+		LM_ERR("async timer list not initialized - check modparams\n");
+		return -1;
+	}
 	if(milliseconds <= 0) {
 		LM_ERR("negative or zero sleep time (%d)\n", milliseconds);
 		return -1;




More information about the sr-dev mailing list