pkgsrc/mail/mush/patches/patch-al

25 lines
572 B
Text

$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;