Module: kamailio Branch: master Commit: 38b8fbdf940b273cf541678fd22af7dd4d63ab3d URL: https://github.com/kamailio/kamailio/commit/38b8fbdf940b273cf541678fd22af7dd4d63ab3d
Author: lyokha <[email protected]> Committer: Daniel-Constantin Mierla <[email protected]> Date: 2018-04-24T14:46:32+02:00 textops: reinitialize new tr_param_t object for tr_txt_parse_re() - avoid segfault when running fparam_free_restore() on such an object immediately after creation, because its field "next" contains garbage --- Modified: src/modules/textops/txt_var.c --- Diff: https://github.com/kamailio/kamailio/commit/38b8fbdf940b273cf541678fd22af7dd4d63ab3d.diff Patch: https://github.com/kamailio/kamailio/commit/38b8fbdf940b273cf541678fd22af7dd4d63ab3d.patch --- diff --git a/src/modules/textops/txt_var.c b/src/modules/textops/txt_var.c index 398cd42120..6970b66bc7 100644 --- a/src/modules/textops/txt_var.c +++ b/src/modules/textops/txt_var.c @@ -215,6 +215,7 @@ char* tr_txt_parse_re(str *in, trans_t *t) LM_ERR("no more private memory!\n"); goto error; } + memset(tp, 0, sizeof(tr_param_t)); se=subst_parser(&tok); _______________________________________________ Kamailio (SER) - Development Mailing List [email protected] https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-dev
