Browse code

async: safety check for async ms list

(cherry picked from commit 5b0e74c1832d2d09fe36424e1e1aaaacde920b31)
(cherry picked from commit 93dc038f3f1f854b1e0987ec28e49d8a70293e19)
(cherry picked from commit 30b33f772739c593f1b58a2b871e127effd12f58)

Daniel-Constantin Mierla authored on 31/05/2021 15:23:42 • Henning Westerholt committed on 22/10/2021 11:55:45
Showing 1 changed files
... ...
@@ -370,6 +370,10 @@ int async_ms_sleep(sip_msg_t *msg, int milliseconds, cfg_action_t *act, str *cbn
370 370
 	async_task_param_t *atp;
371 371
 	async_task_t *at;
372 372
 
373
+	if (_async_ms_list==NULL) {
374
+		LM_ERR("async timer list not initialized - check modparams\n");
375
+		return -1;
376
+	}
373 377
 	if(milliseconds <= 0) {
374 378
 		LM_ERR("negative or zero sleep time (%d)\n", milliseconds);
375 379
 		return -1;