mirror of
https://git.hardenedbsd.org/hardenedbsd/HardenedBSD.git
synced 2024-11-14 22:32:30 +01:00
Avoid overflow of file buffer
Submitted by: db Approved by: cperciva MFC after: 2 weeks
This commit is contained in:
parent
61fd27bb3b
commit
6c3c59886c
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=243895
@ -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