diff options
author | Eitan Adler <eadler@FreeBSD.org> | 2012-12-05 13:56:46 +0000 |
---|---|---|
committer | Eitan Adler <eadler@FreeBSD.org> | 2012-12-05 13:56:46 +0000 |
commit | 85bd783a36b8090690f2fddfe2069fc0ea6b4159 (patch) | |
tree | 86f481db919ad7c8bdd92fa329d40cd7b0a5e1d2 /pw | |
parent | f143c5375336dc02525eb9d9509af756e3dd61e9 (diff) | |
download | pw-darwin-85bd783a36b8090690f2fddfe2069fc0ea6b4159.tar.gz pw-darwin-85bd783a36b8090690f2fddfe2069fc0ea6b4159.tar.zst pw-darwin-85bd783a36b8090690f2fddfe2069fc0ea6b4159.zip |
Avoid overflow of file buffer
Submitted by: db
Approved by: cperciva
MFC after: 2 weeks
Diffstat (limited to 'pw')
-rw-r--r-- | pw/pw_user.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/pw/pw_user.c b/pw/pw_user.c index abf1c35..23a7856 100644 --- a/pw/pw_user.c +++ b/pw/pw_user.c @@ -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); |