diff options
| author | Kris Kennaway <kris@FreeBSD.org> | 2001-03-05 10:53:23 +0000 |
|---|---|---|
| committer | Kris Kennaway <kris@FreeBSD.org> | 2001-03-05 10:53:23 +0000 |
| commit | 831a520f902313ec78e29f7412943638d0e29fcf (patch) | |
| tree | 90230d0968e4443b7d0509bb83d81c433c27bc61 | |
| parent | 86a24df8ac9aa4abb02121602be1a9e751d73e61 (diff) | |
Notes
| -rw-r--r-- | libexec/atrun/atrun.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/libexec/atrun/atrun.c b/libexec/atrun/atrun.c index ae9ebc916a90..444b3dc82cf5 100644 --- a/libexec/atrun/atrun.c +++ b/libexec/atrun/atrun.c @@ -209,7 +209,8 @@ run_file(const char *filename, uid_t uid, gid_t gid) fcntl(fd_in, F_SETFD, fflags & ~FD_CLOEXEC); - snprintf(fmt, 49, "#!/bin/sh\n# atrun uid=%%ld gid=%%ld\n# mail %%%ds %%d", + snprintf(fmt, sizeof(fmt), + "#!/bin/sh\n# atrun uid=%%ld gid=%%ld\n# mail %%%ds %%d", LOGNAMESIZE); if (fscanf(stream, fmt, &nuid, &ngid, mailbuf, &send_mail) != 4) { syslog(LOG_ERR,"File %s is in wrong format - aborting", filename); |
