mirror of https://github.com/BOINC/boinc.git
use snprintf to prevent buffer overflow
fixes CID 27964 found by Coverity
This commit is contained in:
parent
5c7cf964e5
commit
d280db48be
|
@ -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]);
|
||||
|
|
Loading…
Reference in New Issue