From 4f13c9a291eeeb2f3d3b7654308b13396fe020af Mon Sep 17 00:00:00 2001 From: Daniel-Constantin Mierla Date: Thu, 19 Jul 2018 10:28:24 +0200 Subject: [PATCH] dialog: safety check for dialog hash table inside dlg_get() - GH #1594 --- src/modules/dialog/dlg_hash.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/modules/dialog/dlg_hash.c b/src/modules/dialog/dlg_hash.c index 23955eaf5e8..a6c8cdeb7bf 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);