Module: kamailio Branch: 5.2 Commit: 761758b1d8a7ebdb72caf8d5442a38988cf2e951 URL: https://github.com/kamailio/kamailio/commit/761758b1d8a7ebdb72caf8d5442a38988cf2e951
Author: Federico Cabiddu <federico.cabi...@gmail.com> Committer: Federico Cabiddu <federico.cabi...@gmail.com> Date: 2019-09-08T10:20:56+02:00 dialog: check xdata length when loading profile from db (cherry picked from commit d05dfc20632fde1d65017ff5d7f41713a9c79825) --- Modified: src/modules/dialog/dlg_db_handler.c --- Diff: https://github.com/kamailio/kamailio/commit/761758b1d8a7ebdb72caf8d5442a38988cf2e951.diff Patch: https://github.com/kamailio/kamailio/commit/761758b1d8a7ebdb72caf8d5442a38988cf2e951.patch --- diff --git a/src/modules/dialog/dlg_db_handler.c b/src/modules/dialog/dlg_db_handler.c index 1b9d704cf6..b15cc86485 100644 --- a/src/modules/dialog/dlg_db_handler.c +++ b/src/modules/dialog/dlg_db_handler.c @@ -452,7 +452,7 @@ int load_dialog_info_from_db(int dlg_hash_size, int fetch_num_rows, dlg_set_toroute(dlg, &toroute_name); GET_STR_VALUE(xdata, values, 21, 0, 0); - if(xdata.s!=NULL && dlg->state!=DLG_STATE_DELETED) + if(xdata.len > 0 && xdata.s!=NULL && dlg->state!=DLG_STATE_DELETED) { srjson_InitDoc(&jdoc, NULL); jdoc.buf = xdata; _______________________________________________ Kamailio (SER) - Development Mailing List sr-dev@lists.kamailio.org https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-dev