[sr-dev] git:master:270af568: modules:sipcapture Fixed wrong pointer for payload buffer.

Alexandr Dubovikov alexandr.dubovikov at gmail.com
Tue Apr 23 08:55:12 CEST 2019


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

Author: Alexandr Dubovikov <alexandr.dubovikov at gmail.com>
Committer: Alexandr Dubovikov <alexandr.dubovikov at gmail.com>
Date: 2019-04-16T13:28:23+02:00

modules:sipcapture Fixed wrong pointer for payload buffer.

---

Modified: src/modules/sipcapture/hep.c
Modified: src/modules/sipcapture/sipcapture.c

---

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

---

diff --git a/src/modules/sipcapture/hep.c b/src/modules/sipcapture/hep.c
index 0430b96969..f435477a09 100644
--- a/src/modules/sipcapture/hep.c
+++ b/src/modules/sipcapture/hep.c
@@ -739,7 +739,11 @@ int hepv3_message_parse(char *buf, unsigned int len, sip_msg_t *msg)
 		msg->rcv.proto = PROTO_UDP;
 
 	if(payload != NULL)
+	{
 		ret = len - payload_len;
+		msg->buf = payload;
+                msg->len = payload_len;
+	}
 
 
 done:
diff --git a/src/modules/sipcapture/sipcapture.c b/src/modules/sipcapture/sipcapture.c
index dbb53c0537..a7a7564608 100644
--- a/src/modules/sipcapture/sipcapture.c
+++ b/src/modules/sipcapture/sipcapture.c
@@ -2969,11 +2969,8 @@ static int nosip_hep_msg(sr_event_param_t *evp)
 			return 0;
 		}
 
-		buf = msg->buf + len;
-		len = msg->len - len;
-
-		msg->buf = buf;
-		msg->len = len;
+		buf = msg->buf;
+		len = msg->len;
 	} else {
 		LOG(L_ERR, "ERROR: sipcapture:hep_msg_received: not supported version "
 				"or bad length: v:[%d] l:[%d]\n",




More information about the sr-dev mailing list