Module: kamailio
Branch: 4.4
Commit: e292e044800611eb3f27a17193af6a3ec66fdd83
URL:
https://github.com/kamailio/kamailio/commit/e292e044800611eb3f27a17193af6a3…
Author: Daniel-Constantin Mierla <miconda(a)gmail.com>
Committer: Daniel-Constantin Mierla <miconda(a)gmail.com>
Date: 2016-11-28T20:42:16+01:00
pua_dialoginfo: safety check of paramters for __dialog_sendpublish()
- reported by Davy Van De Moere, GH #865
(cherry picked from commit 1d1d2246c8f89aa6eda52bda479014be0a10b937)
---
Modified: modules/pua_dialoginfo/pua_dialoginfo.c
---
Diff:
https://github.com/kamailio/kamailio/commit/e292e044800611eb3f27a17193af6a3…
Patch:
https://github.com/kamailio/kamailio/commit/e292e044800611eb3f27a17193af6a3…
---
diff --git a/modules/pua_dialoginfo/pua_dialoginfo.c
b/modules/pua_dialoginfo/pua_dialoginfo.c
index 2e050d3..085d265 100644
--- a/modules/pua_dialoginfo/pua_dialoginfo.c
+++ b/modules/pua_dialoginfo/pua_dialoginfo.c
@@ -254,10 +254,15 @@ __dialog_sendpublish(struct dlg_cell *dlg, int type, struct
dlg_cb_params *_para
str tag = {0,0};
str uri = {0,0};
str target = {0,0};
+ struct dlginfo_cell *dlginfo = NULL;
+ dlginfo = (struct dlginfo_cell*)*_params->param;
- struct dlginfo_cell *dlginfo = (struct dlginfo_cell*)*_params->param;
-
+ if(dlg==NULL || dlginfo==NULL) {
+ LM_WARN("execution with null parameters - type %d, dlg %p, info %p\n",
+ type, dlg, dlginfo);
+ return;
+ }
if(include_req_uri) {
uri = dlginfo->req_uri;
} else {