diff options
author | 2012-12-05 13:56:46 +0000 | |
---|---|---|
committer | 2012-12-05 13:56:46 +0000 | |
commit | 460a14f4c167f92ba6c42a33854a8a5bc5504797 (patch) | |
tree | 18087522de3fdfb328b568a22c72538a3bddd96e /pw | |
parent | 4ab1204d48d11e3671dceb65e745429ff5ee1f9d (diff) | |
download | pw-darwin-460a14f4c167f92ba6c42a33854a8a5bc5504797.tar.gz pw-darwin-460a14f4c167f92ba6c42a33854a8a5bc5504797.tar.zst pw-darwin-460a14f4c167f92ba6c42a33854a8a5bc5504797.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); |