Module: kamailio Branch: master Commit: a473811c163071fbce5b0eb4b25ee77248234ad1 URL: https://github.com/kamailio/kamailio/commit/a473811c163071fbce5b0eb4b25ee77248234ad1
Author: Daniel-Constantin Mierla <mico...@gmail.com> Committer: Daniel-Constantin Mierla <mico...@gmail.com> Date: 2017-01-30T17:28:59+01:00 ipops: avoid out of range index when sorting srv pv --- Modified: src/modules/ipops/ipops_pv.c --- Diff: https://github.com/kamailio/kamailio/commit/a473811c163071fbce5b0eb4b25ee77248234ad1.diff Patch: https://github.com/kamailio/kamailio/commit/a473811c163071fbce5b0eb4b25ee77248234ad1.patch --- diff --git a/src/modules/ipops/ipops_pv.c b/src/modules/ipops/ipops_pv.c index b522bb2..a0f4d24 100644 --- a/src/modules/ipops/ipops_pv.c +++ b/src/modules/ipops/ipops_pv.c @@ -829,7 +829,7 @@ void sort_srv (struct srv_rdata **plist, int rcount) idx2 = 0; pswap = plist [0]; - for (idx1 = 1; idx1 <= rcount; idx1++) { + for (idx1 = 1; idx1 < rcount; idx1++) { if ((idx1 == rcount) || (pswap->priority != plist [idx1]->priority)) { /********** * o range has more than one element? _______________________________________________ sr-dev mailing list sr-dev@lists.sip-router.org http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-dev