[sr-dev] git:master:0678f51d: Merge pull request #337 from doublec/textops_null_dereference

Daniel-Constantin Mierla miconda at gmail.com
Wed Sep 23 14:41:12 CEST 2015


Module: kamailio
Branch: master
Commit: 0678f51d227377edee3cf3ecad7b410638bff0df
URL: https://github.com/kamailio/kamailio/commit/0678f51d227377edee3cf3ecad7b410638bff0df

Author: Daniel-Constantin Mierla <miconda at gmail.com>
Committer: Daniel-Constantin Mierla <miconda at gmail.com>
Date: 2015-09-23T14:41:07+02:00

Merge pull request #337 from doublec/textops_null_dereference

textops: prevent null dereference on tr_txt_eval_re error

---

Modified: modules/textops/txt_var.c

---

Diff:  https://github.com/kamailio/kamailio/commit/0678f51d227377edee3cf3ecad7b410638bff0df.diff
Patch: https://github.com/kamailio/kamailio/commit/0678f51d227377edee3cf3ecad7b410638bff0df.patch

---

diff --git a/modules/textops/txt_var.c b/modules/textops/txt_var.c
index 0f704e3..41201f7 100644
--- a/modules/textops/txt_var.c
+++ b/modules/textops/txt_var.c
@@ -124,7 +124,7 @@ int tr_txt_eval_re(struct sip_msg *msg, tr_param_t *tp, int subtype,
 	return 0;
 
 error:
-	if (tp->type == TR_PARAM_SPEC) {
+	if (tp->type == TR_PARAM_SPEC && se!=NULL) {
 		subst_expr_free(se);
 	}
 	return -1;




More information about the sr-dev mailing list