summaryrefslogtreecommitdiff
path: root/mail/mush/patches/patch-al
blob: 940e9171c95cfce02f9549d67b344c163840a569 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
$NetBSD: patch-al,v 1.2 2002/03/16 02:07:34 christos Exp $

--- dates.c.orig	Fri Mar 15 21:01:54 2002
+++ dates.c	Fri Mar 15 21:06:33 2002
@@ -101,7 +101,7 @@
 {
     long year, julian;
 
-    if (tym->tm_year < 100)
+    if (tym->tm_year < 1000)
 	year = tym->tm_year + 1900;
     if (year < 69)
 	year += 100;
@@ -375,6 +375,11 @@
     }
     if (Year > 1900)
 	Year -= 1900;
+    else if (Year < 0) {
+	print("Unknown date format: %s\n", p);
+	return NULL;
+    }
+	
     if (!Month && (Month = month_to_n(month)) == -1) {
 	print("bad month: %s\n", p);
 	return NULL;