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

Author: Daniel-Constantin Mierla <[email protected]>
Committer: Daniel-Constantin Mierla <[email protected]>
Date: 2018-07-19T10:29:05+02:00

dialog: safety check for dialog hash table inside dlg_get()

- GH #1594

---

Modified: src/modules/dialog/dlg_hash.c

---

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

---

diff --git a/src/modules/dialog/dlg_hash.c b/src/modules/dialog/dlg_hash.c
index 23955eaf5e..a6c8cdeb7b 100644
--- a/src/modules/dialog/dlg_hash.c
+++ b/src/modules/dialog/dlg_hash.c
@@ -801,6 +801,10 @@ struct dlg_cell* get_dlg( str *callid, str *ftag, str 
*ttag, unsigned int *dir)
        struct dlg_cell *dlg;
        unsigned int he;
 
+       if(d_table==NULL) {
+               LM_ERR("dialog hash table not available\n");
+               return 0;
+       }
        he = core_hash(callid, 0, d_table->size);
        dlg = internal_get_dlg(he, callid, ftag, ttag, dir, 0);
 


_______________________________________________
Kamailio (SER) - Development Mailing List
[email protected]
https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-dev

Reply via email to