Closed Bug 210279 Opened 21 years ago Closed 21 years ago

crash if clicking on compose when an addressbook entry does not have an email

Categories

(SeaMonkey :: MailNews: Address Book & Contacts, defect)

x86
Linux
defect
Not set
critical

Tracking

(Not tracked)

RESOLVED FIXED

People

(Reporter: bwp6, Assigned: sspitzer)

Details

(Keywords: crash, regression)

Attachments

(2 files)

User-Agent:       Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.5a) Gecko/20030621
Build Identifier: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.5a) Gecko/20030621

In the addressbook, when I click on compose, if the selected addressbook entry
does not have an email entry, Mozilla crashes completely.  
Created a new profile with the same results

Reproducible: Always

Steps to Reproduce:
1.Open addressbook
2.select an entry that does not have and email entry
3.click on compose button on toolbar

Actual Results:  
all windows in Mozilla crashes

Expected Results:  
Mozilla should have either:
1. done nothing since there is no email address in the addressbook entry.
2. Indicated that there is no email address in the addressbook entry.
3. opened a compose window with no email address in the "to" box.
Attached file stacktrace
(gdb) frame 6
#6  0x45868c52 in nsMsgHeaderParser::MakeFullAddressWString(unsigned short
const*, unsigned short const*, unsigned short**) (this=0x0, name=0x89bcfb0,
addr=0x89bc648, fullAddress=0xbfffb440)
    at nsMsgHeaderParser.cpp:308
308	    *fullAddress = ToNewUnicode(NS_ConvertUTF8toUCS2(utf8Str.get()));
(gdb) p utf8Str.get()
[Switching to Thread 1078462336 (LWP 32261)]
$1 = 0x0
(gdb) p addr
$2 = (const PRUnichar *) 0x89bc648
(gdb) x/2c addr
0x89bc648:	0 '\0'	0 '\0'
marking NEW
this regressed between 2003061005 and 2003061105, due to changes from bug 206682
Status: UNCONFIRMED → NEW
Ever confirmed: true
Keywords: crash, regression
Attached patch proposed patchSplinter Review
I'd thought nsDependent[C]String crashed on null pointers, but they don't. 
They only assert.  So we should make NS_ConvertUTF8toUCS2 null-safe again.

(Should we add assertions?)
Attachment #126266 - Flags: superreview?(jst)
Attachment #126266 - Flags: review?(jaggernaut)
Comment on attachment 126266 [details] [diff] [review]
proposed patch

r+sr=jag
Attachment #126266 - Flags: superreview?(jst)
Attachment #126266 - Flags: superreview+
Attachment #126266 - Flags: review?(jaggernaut)
Attachment #126266 - Flags: review+
Fix checked in to trunk, 2003-06-23 22:42 -0700.
Status: NEW → RESOLVED
Closed: 21 years ago
Resolution: --- → FIXED
Product: Browser → Seamonkey
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: