[sr-dev] git:master:b62492e2: textops: use safer function to parse header name in short buffer

Daniel-Constantin Mierla miconda at gmail.com
Wed Sep 2 13:31:45 CEST 2015


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

Author: Daniel-Constantin Mierla <miconda at gmail.com>
Committer: Daniel-Constantin Mierla <miconda at gmail.com>
Date: 2015-09-02T13:30:58+02:00

textops: use safer function to parse header name in short buffer

---

Modified: modules/textops/textops.c

---

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

---

diff --git a/modules/textops/textops.c b/modules/textops/textops.c
index 7c5e2af..9aaada6 100644
--- a/modules/textops/textops.c
+++ b/modules/textops/textops.c
@@ -2226,8 +2226,7 @@ static int hname_fixup(void** param, int param_no)
 	gp->v.str.s[gp->v.str.len] = ':';
 	gp->v.str.len++;
 	
-	if (parse_hname2(gp->v.str.s, gp->v.str.s
-				+ ((gp->v.str.len<4)?4:gp->v.str.len), &hdr)==0)
+	if (parse_hname2_short(gp->v.str.s, gp->v.str.s + gp->v.str.len, &hdr)==0)
 	{
 		LM_ERR("error parsing header name\n");
 		pkg_free(gp);




More information about the sr-dev mailing list