summaryrefslogtreecommitdiff
path: root/usr.bin/calendar/calendar.c
diff options
context:
space:
mode:
authorPaul Janzen <pjanzen@cvs.openbsd.org>1998-11-04 11:32:03 +0000
committerPaul Janzen <pjanzen@cvs.openbsd.org>1998-11-04 11:32:03 +0000
commit6db8b48c2d7a5d5620138f85c25c9941e9aeb2b9 (patch)
tree8063c525d8371399861b6b28fa7d3adb6b24147f /usr.bin/calendar/calendar.c
parent19ceb41e26b9169446c457bd83a13fc2c5c271c1 (diff)
Various fixes, including closing user/630.
Diffstat (limited to 'usr.bin/calendar/calendar.c')
-rw-r--r--usr.bin/calendar/calendar.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/usr.bin/calendar/calendar.c b/usr.bin/calendar/calendar.c
index 6fbf4e8329a..0a3dd8ef863 100644
--- a/usr.bin/calendar/calendar.c
+++ b/usr.bin/calendar/calendar.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: calendar.c,v 1.10 1997/09/15 07:12:03 millert Exp $ */
+/* $OpenBSD: calendar.c,v 1.11 1998/11/04 11:32:02 pjanzen Exp $ */
/*
* Copyright (c) 1989, 1993, 1994
@@ -43,7 +43,7 @@ static const char copyright[] =
#if 0
static const char sccsid[] = "@(#)calendar.c 8.3 (Berkeley) 3/25/94";
#else
-static char rcsid[] = "$OpenBSD: calendar.c,v 1.10 1997/09/15 07:12:03 millert Exp $";
+static char rcsid[] = "$OpenBSD: calendar.c,v 1.11 1998/11/04 11:32:02 pjanzen Exp $";
#endif
#endif /* not lint */
@@ -91,7 +91,8 @@ main(argc, argv)
break;
case 't': /* other date, undocumented, for tests */
- f_time = Mktime (optarg);
+ if ((f_time = Mktime (optarg)) <= 0)
+ errx(1, "specified date is outside allowed range");
break;
case 'A': /* days after current date */