Closed
Bug 197203
Opened 21 years ago
Closed 21 years ago
crash if no '@' in From field address
Categories
(MailNews Core :: Composition, defect)
Tracking
(Not tracked)
RESOLVED
FIXED
mozilla1.4alpha
People
(Reporter: parish, Assigned: parish)
References
Details
(Keywords: crash, stackwanted)
Attachments
(1 file, 1 obsolete file)
661 bytes,
patch
|
Details | Diff | Splinter Review |
User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.4a) Gecko/20030313 Netscape6/6.5 Build Identifier: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.4a) Gecko/20030313 If you use a munged anti-spam address without a '@' in it, Mozilla crashes shen you click Send. Reproducible: Always Steps to Reproduce: 1. Edit your mail account e-mail address, or create a dummy account, and replace/remove the '@', e.g. parish_AT_ntlworld.com 2. Compose a mail using the munged address for the From 3. Click Send or Send Later. Actual Results: Mozilla crashes with an Access violation in msgcompo.dll Note, this does not happen if you use such an address in the To:/Cc: fields. Expected Results: Mail should be sent or saved in Unsent Messages. Patch on it's way
In msg_generate_message_id(), PL_strchr() returns a null ptr if no '@' in From address. We don't check for this before incrementing it and passing to isValidHost() where it crashes.
Attachment #117085 -
Flags: review?(ducarroz)
Comment 2•21 years ago
|
||
Marking NEW since it has a patch.
Severity: normal → critical
Status: UNCONFIRMED → NEW
Ever confirmed: true
Keywords: crash,
stackwanted
Comment 4•21 years ago
|
||
Comment on attachment 117085 [details] [diff] [review] Check for PL_strchr() returning a null ptr. R=ducarroz
Attachment #117085 -
Flags: review?(ducarroz) → review+
Attachment #117085 -
Flags: superreview?(sspitzer)
Comment 5•21 years ago
|
||
re-assign to parish@ntlworld.com, since he as a patch. I'll review and drive this in today, since it is a crasher.
Assignee: ssu → parish
Comment 6•21 years ago
|
||
actually, the patch could just be: if (host) ++host; because right after that, we call if (!isValidHost(host)) and return if it isn't valid, and it will do the right thing if host is null. I'll attach a modified patch.
Comment 7•21 years ago
|
||
also, use strchr(), instead of PL_strchr() for performance reasons.
Attachment #117085 -
Attachment is obsolete: true
Updated•21 years ago
|
Attachment #117085 -
Flags: superreview?(sspitzer) → superreview-
Comment 8•21 years ago
|
||
parish, thanks for logging the bug and finding the fix. I'll land the modified patch today. assigning to 1.4 alpha, and marking "accepted" on parish's behalf.
Status: NEW → ASSIGNED
Target Milestone: --- → mozilla1.4alpha
Comment 9•21 years ago
|
||
I've checked in the patch based on parish's initial patch.
Status: ASSIGNED → RESOLVED
Closed: 21 years ago
Resolution: --- → FIXED
Summary: Mozilla crashes if no '@' in From field address → crash if no '@' in From field address
Comment 10•21 years ago
|
||
*** Bug 198256 has been marked as a duplicate of this bug. ***
Comment 11•21 years ago
|
||
*** Bug 203375 has been marked as a duplicate of this bug. ***
Comment 12•21 years ago
|
||
*** Bug 205619 has been marked as a duplicate of this bug. ***
Updated•20 years ago
|
Product: MailNews → Core
Updated•16 years ago
|
Product: Core → MailNews Core
You need to log in
before you can comment on or make changes to this bug.
Description
•