Skip to content

Commit

Permalink
Fix for access due to low memory.
Browse files Browse the repository at this point in the history
If you check after a memory access, then you always have access from outside. with stricter control of memory boundaries, this can lead to an abnormal termination of the program.

(cherry picked from commit 9ed1485)
  • Loading branch information
ihsinme authored and liviuchircu committed Oct 25, 2022
1 parent 15ef14a commit 5402546
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion cfg.y
Original file line number Diff line number Diff line change
Expand Up @@ -1506,7 +1506,7 @@ startup_route_stm: ROUTE_STARTUP LBRACE actions RBRACE {

timer_route_stm: ROUTE_TIMER LBRACK route_name COMMA NUMBER RBRACK LBRACE actions RBRACE {
i_tmp = 0;
while(sroutes->timer[i_tmp].a!=0 && i_tmp<TIMER_RT_NO){
while(i_tmp<TIMER_RT_NO && sroutes->timer[i_tmp].a!=0){
i_tmp++;
}
if(i_tmp == TIMER_RT_NO) {
Expand Down

0 comments on commit 5402546

Please sign in to comment.