Module: kamailio Branch: master Commit: a383caa12a1af2cbc0f135add643045a159f24f2 URL: https://github.com/kamailio/kamailio/commit/a383caa12a1af2cbc0f135add643045a159f24f2
Author: Daniel-Constantin Mierla <mico...@gmail.com> Committer: Daniel-Constantin Mierla <mico...@gmail.com> Date: 2020-01-07T10:11:42+01:00 ipops: fix locating static index for dns pv - reported by GH #2179 --- Modified: src/modules/ipops/ipops_pv.c --- Diff: https://github.com/kamailio/kamailio/commit/a383caa12a1af2cbc0f135add643045a159f24f2.diff Patch: https://github.com/kamailio/kamailio/commit/a383caa12a1af2cbc0f135add643045a159f24f2.patch --- diff --git a/src/modules/ipops/ipops_pv.c b/src/modules/ipops/ipops_pv.c index 5f77aa969c..6e9d86b5a6 100644 --- a/src/modules/ipops/ipops_pv.c +++ b/src/modules/ipops/ipops_pv.c @@ -190,7 +190,7 @@ int pv_parse_dns_name(pv_spec_t *sp, str *in) goto error; } pvi.s = p + 1; - pvi.len = pvs.s + pvs.len - pvi.s; + pvi.len = pvs.s + pvs.len - 1 - pvi.s; pvs.len = p - pvs.s; } LM_DBG("dns [%.*s] - key [%.*s] index [%.*s]\n", pvc.len, pvc.s, @@ -246,7 +246,8 @@ int pv_parse_dns_name(pv_spec_t *sp, str *in) } if(p!=pvi.s+pvi.len) { - LM_ERR("invalid index [%.*s]\n", in->len, in->s); + LM_ERR("invalid index [%.*s] in [%.*s]\n", pvi.len, pvi.s, + in->len, in->s); goto error; } dpv->nidx *= sign; _______________________________________________ Kamailio (SER) - Development Mailing List sr-dev@lists.kamailio.org https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-dev