[sr-dev] git:master:176c98b0: modules/ims_dialog: check branch is set before dereferencing

jaybeepee jason.penton at gmail.com
Mon Feb 29 13:11:19 CET 2016


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

Author: jaybeepee <jason.penton at gmail.com>
Committer: jaybeepee <jason.penton at gmail.com>
Date: 2016-02-29T14:11:04+02:00

modules/ims_dialog: check branch is set before dereferencing

---

Modified: modules/ims_dialog/dlg_hash.c

---

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

---

diff --git a/modules/ims_dialog/dlg_hash.c b/modules/ims_dialog/dlg_hash.c
index 5860df4..01a51f5 100644
--- a/modules/ims_dialog/dlg_hash.c
+++ b/modules/ims_dialog/dlg_hash.c
@@ -510,7 +510,7 @@ struct dlg_cell_out* build_new_dlg_out(struct dlg_cell *dlg, str* to_uri, str* t
 
     p = (char*) (dlg_out + 1);
 
-    if (branch->len > 0) {
+    if (branch && branch->len > 0) {
         dlg_out->branch.s = p;
         dlg_out->branch.len = branch->len;
         memcpy(p, branch->s, branch->len);




More information about the sr-dev mailing list