Skip to content

Commit

Permalink
app_lua_sr: use snprintf() instead of sprintf()
Browse files Browse the repository at this point in the history
  • Loading branch information
miconda committed Nov 25, 2019
1 parent f39f732 commit d48ae79
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/modules/app_lua_sr/app_lua_sr_exp.c
Expand Up @@ -655,7 +655,7 @@ static int lua_sr_tm_t_on_branch_failure(lua_State *L)
}
rt_name.len = rt_name_len;
}
sprintf(rt_name.s, "%s:%s", BRANCH_FAILURE_ROUTE_PREFIX, name);
snprintf(rt_name.s, rt_name_len+1, "%s:%s", BRANCH_FAILURE_ROUTE_PREFIX, name);

i = route_get(&event_rt, rt_name.s);
if(i < 0 || event_rt.rlist[i]==0)
Expand Down

0 comments on commit d48ae79

Please sign in to comment.