use snprintf to prevent buffer overflow

fixes CID 27964 found by Coverity
This commit is contained in:
Christian Beer 2015-10-21 15:47:32 +02:00
parent 5c7cf964e5
commit d280db48be
1 changed files with 1 additions and 1 deletions

View File

@ -80,7 +80,7 @@ int main(int argc, char** argv) {
}
DB_APP app;
sprintf(buf, "where name='%s'", app_name);
snprintf(buf, sizeof(buf), "where name='%s'", app_name);
retval = app.lookup(buf);
if (retval) {
fprintf(stderr, "no such app %s\n", argv[3]);