]> granicus.if.org Git - mutt/commitdiff
Fix a segmentation fault occuring with certain badly-formed
authorThomas Roessler <roessler@does-not-exist.org>
Tue, 29 Sep 1998 12:29:17 +0000 (12:29 +0000)
committerThomas Roessler <roessler@does-not-exist.org>
Tue, 29 Sep 1998 12:29:17 +0000 (12:29 +0000)
RFC822-like addresses.

rfc822.c

index 77f56878e9bef8e8d255c124bd14cc8f0847fb89..0ab773ce03c661416870ec81b20965688bcee921 100644 (file)
--- 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);