Skip to content

Commit

Permalink
kex: proper range for array access of reply stats per code class
Browse files Browse the repository at this point in the history
  • Loading branch information
miconda committed Oct 3, 2018
1 parent 522c338 commit 9d6356a
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/modules/kex/core_stats.c
Expand Up @@ -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;
Expand Down

0 comments on commit 9d6356a

Please sign in to comment.