aboutsummaryrefslogtreecommitdiffstats
path: root/rfc822.c
diff options
context:
space:
mode:
Diffstat (limited to 'rfc822.c')
-rw-r--r--rfc822.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/rfc822.c b/rfc822.c
index 0976c701..6539977d 100644
--- a/rfc822.c
+++ b/rfc822.c
@@ -163,8 +163,9 @@ const char *hdr; /* header to be parsed, NUL to continue previous hdr */
else if (HEADER_END(hp))
{
state = ENDIT_ALL;
- while (isspace(*--tp))
- continue;
+ if (tp > address)
+ while (isspace(*--tp))
+ continue;
*++tp = '\0';
return(tp > address ? (tp = address) : (char *)NULL);
}