Skip to content

Commit

Permalink
dialog: safety check for dialog hash table inside dlg_get()
Browse files Browse the repository at this point in the history
- GH #1594

(cherry picked from commit 4f13c9a)
  • Loading branch information
miconda committed Aug 17, 2018
1 parent a13cfbc commit b2f2107
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/modules/dialog/dlg_hash.c
Original file line number Diff line number Diff line change
Expand Up @@ -794,6 +794,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);

Expand Down

0 comments on commit b2f2107

Please sign in to comment.