The default bug view has changed. See this FAQ.

Possible crash with null m_identity in nsMsgCompose::ConvertAndLoadComposeWindow

RESOLVED FIXED in Thunderbird 20.0


MailNews Core
4 years ago
4 years ago


(Reporter: rkent, Assigned: aceman)


Thunderbird 20.0

Firefox Tracking Flags

(Not tracked)



(1 attachment)

1.14 KB, patch
: review+
Details | Diff | Splinter Review


4 years ago
In my ExQuilla binary extension, I'm managed to setup a situation where nsMsgCompose::ConvertAndLoadComposeWindow is being called with a null m_identity, which causes a crash. The core code should protect against this.
FWIW, there are no crashes in current versions with this signature. 

but 3.x releases did, as in bp-b94699c0-2945-4dfd-9d33-6484c2121124 with signature nsCOMPtr_base::~nsCOMPtr_base() | nsMsgCompose::ConvertAndLoadComposeWindow(nsString&, nsString&, nsString&, int, int)

Comment 2

4 years ago
rkent, did you call nsMsgCompose::Initialize first?

Comment 3

4 years ago
(In reply to :aceman from comment #2)
> rkent, did you call nsMsgCompose::Initialize first?

That would be an ExQuilla bug, and the underlying code is being revised. As a philosophy though, code that is easy to cause crashes in (particularly if the code is scriptable xpcom) should have checks added, as well as fixing the underlying cause.

This particular case is somewhat weaker since the idl entry for this call is marked [noscript]. But the fix is really easy. For my own purposes, since I do a C++ wrap of the compose code in my extension, I went ahead and added the fix in my own code.

See for what I ended up doing. For the fix for bug 615856 I added a patch for the core code as well, but I have not done one for this one since it is really rare.

Comment 4

4 years ago
Should we error out in case of no m_identity or can we initialize it in some way? But we probably don't have the needed Params at hand.

Comment 5

4 years ago
I would just error out.

Comment 6

4 years ago
Created attachment 689324 [details] [diff] [review]
Assignee: nobody → acelists
Attachment #689324 - Flags: review?(neil)


4 years ago
Attachment #689324 - Flags: review?(neil) → review+


4 years ago
Keywords: checkin-needed
OS: Windows 7 → All
Hardware: x86_64 → All
Version: unspecified → Trunk
Last Resolved: 4 years ago
Keywords: checkin-needed
Resolution: --- → FIXED
Target Milestone: --- → Thunderbird 20.0
You need to log in before you can comment on or make changes to this bug.