[sr-dev] git:master:8d570538: modules/siputils: fix $pcv(genaddr) length issue

Mikko Lehto mslehto at iki.fi
Mon Nov 7 10:01:27 CET 2016


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

Author: Mikko Lehto <mslehto at iki.fi>
Committer: Mikko Lehto <mslehto at iki.fi>
Date: 2016-11-07T01:48:35+02:00

modules/siputils: fix $pcv(genaddr) length issue

$pcv(genaddr) was truncated when field "icid-value" was shorter
than field "icid-generated-at"

---

Modified: modules/siputils/chargingvector.c

---

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

---

diff --git a/modules/siputils/chargingvector.c b/modules/siputils/chargingvector.c
index 51d113e..7e64a52 100644
--- a/modules/siputils/chargingvector.c
+++ b/modules/siputils/chargingvector.c
@@ -180,7 +180,7 @@ static int sip_parse_charging_vector(const char * pcv_value, unsigned int len)
 	if (s != NULL)
 	{
 		pcv_host.s = s + strlen("icid-generated-at=");
-		pcv_host.len = sip_param_end(pcv_id.s, len);
+		pcv_host.len = sip_param_end(pcv_host.s, len);
 		LM_DBG("parsed P-Charging-Vector icid-generated-at=%.*s\n",
 				pcv_host.len, pcv_host.s );
 	}




More information about the sr-dev mailing list