Skip to content

Commit

Permalink
use strncat to prevent buffer overflow
Browse files Browse the repository at this point in the history
fixes CID 27965 found by Coverity
  • Loading branch information
ChristianBeer committed Oct 21, 2015
1 parent d280db4 commit e3b2140
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion sched/feeder.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -774,7 +774,7 @@ int main(int argc, char** argv) {
exit(1);
}
strcat(mod_select_clause, " and workunit.appid in (");
strcat(mod_select_clause, argv[i]);
strncat(mod_select_clause, argv[i], sizeof(mod_select_clause)-25);
strcat(mod_select_clause, ")");
} else if (is_arg(argv[i], "mod")) {
if (!argv[i+1] || !argv[i+2]) {
Expand Down

0 comments on commit e3b2140

Please sign in to comment.