Skip to content

Commit 5378fd0

Browse files
authored
Merge pull request #2041 from l2dy/action
Fix potential out-of-bounds access of sroutes->request
2 parents ea12edb + b6e5d01 commit 5378fd0

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

action.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -663,13 +663,13 @@ int do_action(struct action* a, struct sip_msg* msg)
663663
ret=E_BUG;
664664
break;
665665
}
666-
script_trace("route", sroutes->request[i].name,
667-
msg, a->file, a->line) ;
668666
if ((i>=RT_NO)||(i<0)){
669667
LM_BUG("invalid routing table number in route(%u)\n", i);
670668
ret=E_CFG;
671669
break;
672670
}
671+
script_trace("route", sroutes->request[i].name,
672+
msg, a->file, a->line) ;
673673
/* check if the route has parameters */
674674
if (a->elem[1].type != 0) {
675675
if (a->elem[1].type != NUMBER_ST || a->elem[2].type != SCRIPTVAR_ST) {

0 commit comments

Comments
 (0)