diff --git a/modules/b2b_entities/b2be_db.c b/modules/b2b_entities/b2be_db.c index fc7d8e06491..8333859f41b 100644 --- a/modules/b2b_entities/b2be_db.c +++ b/modules/b2b_entities/b2be_db.c @@ -491,6 +491,12 @@ int b2b_entities_restore(void) LM_ERR("Wrong format for b2b key [%.*s]\n", dlg.tag[1].len, dlg.tag[1].s); goto error; } + + if (hash_index >= server_hsize) { + LM_ERR("Hash Index [%d] too large! Increase the 'server_hsize'" + "parameter!\n", hash_index); + goto error; + } } else { @@ -501,6 +507,12 @@ int b2b_entities_restore(void) LM_ERR("Wrong format for b2b key [%.*s]\n", dlg.callid.len, dlg.callid.s); goto error; } + + if (hash_index >= client_hsize) { + LM_DBG("Hash Index [%d] too large! Increase the 'client_hsize'" + "parameter!\n", hash_index); + goto error; + } } dlg.id = local_index; dlg.state = row_vals[13].val.int_val;