summaryrefslogtreecommitdiff
path: root/libexec/atrun
diff options
context:
space:
mode:
authorKris Kennaway <kris@FreeBSD.org>2000-11-26 10:05:06 +0000
committerKris Kennaway <kris@FreeBSD.org>2000-11-26 10:05:06 +0000
commit18fdc5893a17859c9404b3c2b4d959f259537ed2 (patch)
treefcca92641f4535c5646311b1bbc0646e8482932d /libexec/atrun
parent17c97150493a7c2b4858381866e1dbbe4c719c75 (diff)
Notes
Diffstat (limited to 'libexec/atrun')
-rw-r--r--libexec/atrun/atrun.c3
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);