summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--from.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/from.c b/from.c
index 3a7ef6c6..b426e690 100644
--- a/from.c
+++ b/from.c
@@ -44,7 +44,7 @@ static int is_day_name (const char *s)
{
int i;
- if (!ISSPACE (*(s+3)))
+ if ((strlen(s) < 3) || !*(s + 3) || !ISSPACE (*(s+3)))
return 0;
for (i=0; i<7; i++)
if (strncasecmp (s, Weekdays[i], 3) == 0)