use safe_strcat to prevent buffer overflow

fixes CID 27965 found by Coverity
This commit is contained in:
Christian Beer 2015-10-21 16:46:23 +02:00
parent 2b258b48f7
commit 69cb23cf60
1 changed files with 1 additions and 1 deletions

View File

@ -774,7 +774,7 @@ int main(int argc, char** argv) {
exit(1); exit(1);
} }
strcat(mod_select_clause, " and workunit.appid in ("); strcat(mod_select_clause, " and workunit.appid in (");
strncat(mod_select_clause, argv[i], sizeof(mod_select_clause)-25); safe_strcat(mod_select_clause, argv[i]);
strcat(mod_select_clause, ")"); strcat(mod_select_clause, ")");
} else if (is_arg(argv[i], "mod")) { } else if (is_arg(argv[i], "mod")) {
if (!argv[i+1] || !argv[i+2]) { if (!argv[i+1] || !argv[i+2]) {