Module: kamailio Branch: master Commit: a473811c163071fbce5b0eb4b25ee77248234ad1 URL: https://github.com/kamailio/kamailio/commit/a473811c163071fbce5b0eb4b25ee772...
Author: Daniel-Constantin Mierla miconda@gmail.com Committer: Daniel-Constantin Mierla miconda@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/a473811c163071fbce5b0eb4b25ee772... Patch: https://github.com/kamailio/kamailio/commit/a473811c163071fbce5b0eb4b25ee772...
---
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?