Module: kamailio
Branch: master
Commit: 9d6356a4dfe4d455958208face87616126ca49f3
URL:
https://github.com/kamailio/kamailio/commit/9d6356a4dfe4d455958208face87616…
Author: Daniel-Constantin Mierla <miconda(a)gmail.com>
Committer: Daniel-Constantin Mierla <miconda(a)gmail.com>
Date: 2018-10-03T12:29:18+02:00
kex: proper range for array access of reply stats per code class
---
Modified: src/modules/kex/core_stats.c
---
Diff:
https://github.com/kamailio/kamailio/commit/9d6356a4dfe4d455958208face87616…
Patch:
https://github.com/kamailio/kamailio/commit/9d6356a4dfe4d455958208face87616…
---
diff --git a/src/modules/kex/core_stats.c b/src/modules/kex/core_stats.c
index 5d2bcc13a1..2f51a1f955 100644
--- a/src/modules/kex/core_stats.c
+++ b/src/modules/kex/core_stats.c
@@ -237,7 +237,7 @@ static int km_cb_rpl_stats_by_method(struct sip_msg *msg,
int method = get_cseq(msg)->method_id;
int group = msg->first_line.u.reply.statuscode / 100 - 1;
- if (group >= 1 && group <= 6) {
+ if (group >= 0 && group <= 5) {
switch(method) {
case METHOD_INVITE: update_stat( VAR_NAME(invite)[group], 1); break;
case METHOD_CANCEL: update_stat( VAR_NAME(cancel)[group], 1); break;