From b9552e1cff9978d1289b7638e073af9de34fae40 Mon Sep 17 00:00:00 2001 From: "sspitzer%netscape.com" Date: Thu, 13 Mar 2003 19:02:37 +0000 Subject: [PATCH] fix for crasher bug #197203 if your "From" address doesn't have an @ symbol, we crash on send. thanks to parish@ntlworld.com for the bug report, and the initial patch. r/sr=sspitzer git-svn-id: svn://10.0.0.236/trunk@139392 18797224-902f-48f8-a5cc-f745e15eee43 --- mozilla/mailnews/compose/src/nsMsgCompUtils.cpp | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/mozilla/mailnews/compose/src/nsMsgCompUtils.cpp b/mozilla/mailnews/compose/src/nsMsgCompUtils.cpp index 2d2a02dde83..77c9bc7f33e 100644 --- a/mozilla/mailnews/compose/src/nsMsgCompUtils.cpp +++ b/mozilla/mailnews/compose/src/nsMsgCompUtils.cpp @@ -1138,9 +1138,13 @@ msg_generate_message_id (nsIMsgIdentity *identity) { nsresult rv = identity->GetEmail(getter_Copies(from)); if (NS_SUCCEEDED(rv) && from) - host = PL_strchr (from, '@'); + host = strchr(from,'@'); + + // No '@'? Munged address, anti-spam? + // see bug #197203 + if (host) ++host; - } + } if (!isValidHost(host)) /* If we couldn't find a valid host name to use, we can't generate a