From 65f28d41536fbd9fc4be7529de899970046fd38f Mon Sep 17 00:00:00 2001 From: Holger Hans Peter Freyther Date: Fri, 16 Dec 2016 16:13:56 +0100 Subject: [PATCH] sipcapture: Fix $hep(0x007) and $hep(0x008) Fix $hep(0x007) and $hep(0x008) access from the cfg file. In these two cases "i" would not be increased, ending in a infinite loop. Modify and goto done as well. --- src/modules/sipcapture/hep.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/modules/sipcapture/hep.c b/src/modules/sipcapture/hep.c index 6b1ae879987..1533c5d2b36 100644 --- a/src/modules/sipcapture/hep.c +++ b/src/modules/sipcapture/hep.c @@ -977,11 +977,11 @@ int hepv3_get_chunk(struct sip_msg *msg, char *buf, unsigned int len, int req_ch case 7: hg->src_port = (hep_chunk_uint16_t *) (tmp); ret = pv_get_uintval(msg, param, res, ntohs(hg->src_port->data)); - break; + goto done; case 8: hg->dst_port = (hep_chunk_uint16_t *) (tmp); ret = pv_get_uintval(msg, param, res, ntohs(hg->dst_port->data)); - break; + goto done; case 9: hg->time_sec = (hep_chunk_uint32_t *) (tmp); hg->time_sec->data = ntohl(hg->time_sec->data);