From c38d808de18f2c506304f68a536d62e8627576c1 Mon Sep 17 00:00:00 2001 From: "Andrey A. Chernov" Date: Sat, 1 Jul 2000 22:37:02 +0000 Subject: [PATCH] Make sure argv gets NULL terminated if cron entry has >= MAX_ARGS arguments Obtained from: OpenBSD popen.c v1.3 --- usr.sbin/cron/cron/popen.c | 1 + 1 file changed, 1 insertion(+) diff --git a/usr.sbin/cron/cron/popen.c b/usr.sbin/cron/cron/popen.c index 3cd0f9aca9f2..e0861f5614b2 100644 --- a/usr.sbin/cron/cron/popen.c +++ b/usr.sbin/cron/cron/popen.c @@ -80,6 +80,7 @@ cron_popen(program, type) for (argc = 0, cp = program; argc < MAX_ARGS; cp = NULL) if (!(argv[argc++] = strtok(cp, " \t\n"))) break; + argv[MAX_ARGS] = NULL; #if WANT_GLOBBING /* glob each piece */