Module Name: src
Committed By: christos
Date: Sat Aug 3 07:06:48 UTC 2019
Modified Files:
src/external/bsd/cron/dist: do_command.c
Log Message:
PR/54433: Hisashi Todd Fujinaka: Empty $MAILTO causes cron to crash
To generate a diff of this commit:
cvs rdiff -u -r1.13 -r1.14 src/external/bsd/cron/dist/do_command.c
Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.
Modified files:
Index: src/external/bsd/cron/dist/do_command.c
diff -u src/external/bsd/cron/dist/do_command.c:1.13 src/external/bsd/cron/dist/do_command.c:1.14
--- src/external/bsd/cron/dist/do_command.c:1.13 Thu Jun 14 18:04:28 2018
+++ src/external/bsd/cron/dist/do_command.c Sat Aug 3 03:06:47 2019
@@ -1,4 +1,4 @@
-/* $NetBSD: do_command.c,v 1.13 2018/06/14 22:04:28 christos Exp $ */
+/* $NetBSD: do_command.c,v 1.14 2019/08/03 07:06:47 christos Exp $ */
/* Copyright 1988,1990,1993,1994 by Paul Vixie
* All rights reserved
@@ -25,7 +25,7 @@
#if 0
static char rcsid[] = "Id: do_command.c,v 1.9 2004/01/23 18:56:42 vixie Exp";
#else
-__RCSID("$NetBSD: do_command.c,v 1.13 2018/06/14 22:04:28 christos Exp $");
+__RCSID("$NetBSD: do_command.c,v 1.14 2019/08/03 07:06:47 christos Exp $");
#endif
#endif
@@ -182,7 +182,7 @@ read_data(entry *e, const char *mailto,
/*
* Unsafe, disable mailing.
*/
- if (!safe_p(usernm, mailto))
+ if (mailto && !safe_p(usernm, mailto))
mailto = NULL;
/* if we are supposed to be mailing, MAILTO will