X-Git-Url: http://git.madism.org/?a=blobdiff_plain;f=nntp%2Fnntp.c;h=aebf3c4167f7cec5ddf65abb4a6c1fab565037b7;hb=47a98766051a91ceb5e60f7ff5eedc40ea161d61;hp=7121398e4ef1627c429b94226d59f7b5c95cbe37;hpb=dba814e28104a395ffb52e16beccaecf09be8cde;p=apps%2Fmadmutt.git diff --git a/nntp/nntp.c b/nntp/nntp.c index 7121398..aebf3c4 100644 --- a/nntp/nntp.c +++ b/nntp/nntp.c @@ -587,6 +587,15 @@ static int nntp_parse_xover (CONTEXT * ctx, char *buf, HEADER * hdr) rfc822_free_address (&hdr->env->from); hdr->env->from = rfc822_parse_adrlist (hdr->env->from, b); rfc2047_decode_adrlist (hdr->env->from); + /* same as for mutt_parse_rfc822_line(): + * don't leave from info NULL if there's an invalid address (or + * whatever) in From: field; mutt would just display it as empty + * and mark mail/(esp.) news article as your own. aaargh! this + * bothered me for _years_ */ + if (!hdr->env->from) { + hdr->env->from = rfc822_new_address (); + hdr->env->from->personal = str_dup (b); + } break; case 3: hdr->date_sent = mutt_parse_date (b, hdr);