summaryrefslogtreecommitdiffstats
path: root/rfc822.c
diff options
context:
space:
mode:
authorThomas Roessler <roessler@does-not-exist.org>1998-09-29 12:29:17 +0000
committerThomas Roessler <roessler@does-not-exist.org>1998-09-29 12:29:17 +0000
commit9f72f728c668a0fe55b32a5e0957f489730eefa3 (patch)
tree75e455c35019be89d440f57e2b46975d5bec2623 /rfc822.c
parentd126b9e7231e0a3469ba1f4ba571e8dc37cd0309 (diff)
Fix a segmentation fault occuring with certain badly-formed
RFC822-like addresses.
Diffstat (limited to 'rfc822.c')
-rw-r--r--rfc822.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/rfc822.c b/rfc822.c
index 77f56878..0ab773ce 100644
--- a/rfc822.c
+++ b/rfc822.c
@@ -391,7 +391,7 @@ ADDRESS *rfc822_parse_adrlist (ADDRESS *top, const char *s)
phrase[phraselen] = 0;
add_addrspec (&top, &last, phrase, comment, &commentlen, sizeof (comment) - 1);
}
- else if (commentlen && !last->personal)
+ else if (commentlen && last && !last->personal)
{
comment[commentlen] = 0;
last->personal = safe_strdup (comment);