Skip to content

Commit

Permalink
secure strncat
Browse files Browse the repository at this point in the history
  • Loading branch information
pierreguillot committed Jul 26, 2018
1 parent 0e02296 commit 55516f2
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/faust_tilde_ui.c
Original file line number Diff line number Diff line change
Expand Up @@ -110,10 +110,10 @@ static t_symbol* faust_ui_manager_get_long_name(t_faust_ui_manager *x, const cha
memset(name, 0, MAXFAUSTSTRING);
for(i = 0; i < x->f_nnames; ++i)
{
strncat(name, x->f_names[i]->s_name, MAXFAUSTSTRING);
strncat(name, "/", 1);
strncat(name, x->f_names[i]->s_name, MAXFAUSTSTRING - strnlen(name, MAXFAUSTSTRING) - 1);
strncat(name, "/", MAXFAUSTSTRING - strnlen(name, MAXFAUSTSTRING) - 1);
}
strncat(name, label, MAXFAUSTSTRING);
strncat(name, label, MAXFAUSTSTRING - strnlen(name, MAXFAUSTSTRING) - 1);
return gensym(name);
}

Expand Down

0 comments on commit 55516f2

Please sign in to comment.