use strncat to prevent buffer overflow

fixes CID 27965 found by Coverity
This commit is contained in:
Christian Beer 2015-10-21 16:02:36 +02:00
parent d280db48be
commit e3b2140e18
1 changed files with 1 additions and 1 deletions

View File

@ -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]) {