Avoid overflow of file buffer
Submitted by: db Approved by: cperciva MFC after: 2 weeks
This commit is contained in:
parent
61fd27bb3b
commit
6c3c59886c
@ -394,7 +394,7 @@ pw_user(struct userconf * cnf, int mode, struct cargs * args)
|
||||
/*
|
||||
* Remove crontabs
|
||||
*/
|
||||
sprintf(file, "/var/cron/tabs/%s", pwd->pw_name);
|
||||
snprintf(file, sizeof(file), "/var/cron/tabs/%s", pwd->pw_name);
|
||||
if (access(file, F_OK) == 0) {
|
||||
sprintf(file, "crontab -u %s -r", pwd->pw_name);
|
||||
system(file);
|
||||
|
Loading…
Reference in New Issue
Block a user