summaryrefslogtreecommitdiffstats
path: root/from.c
diff options
context:
space:
mode:
authorThomas Roessler <roessler@does-not-exist.org>1998-11-09 19:28:42 +0000
committerThomas Roessler <roessler@does-not-exist.org>1998-11-09 19:28:42 +0000
commit96b9307f2919c96d046f1417d8ca01b35dcae399 (patch)
treeec0dcb67c2ebb0ffc79b55241e537d2c67bd518b /from.c
parent89b86d260e096d4ed0b3e986b446d35708122fed (diff)
Catch possible bad memory access.
Diffstat (limited to 'from.c')
-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)