From 270af568892cece36cdd4c3eea05e3afc99634fa Mon Sep 17 00:00:00 2001 From: Alexandr Dubovikov Date: Tue, 16 Apr 2019 13:28:23 +0200 Subject: [PATCH] modules:sipcapture Fixed wrong pointer for payload buffer. --- src/modules/sipcapture/hep.c | 4 ++++ src/modules/sipcapture/sipcapture.c | 7 ++----- 2 files changed, 6 insertions(+), 5 deletions(-) diff --git a/src/modules/sipcapture/hep.c b/src/modules/sipcapture/hep.c index 0430b96969b..f435477a09c 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 dbb53c05376..a7a75646084 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",