Closed Bug 44699 Opened 25 years ago Closed 25 years ago

IMAP does not check result param from nsIMsgAccountManager::FindServer()

Categories

(MailNews Core :: Networking: IMAP, defect, P3)

defect

Tracking

(Not tracked)

VERIFIED FIXED

People

(Reporter: waterson, Assigned: jefft)

References

()

Details

(Keywords: crash)

Attachments

(1 file)

So I get a crash in IMAP sometimes reading messages. The stack is below. It looks like the problem is that aServer (grr -- it's a local variable, not an argument, why hungarian "a") is null here: http://lxr.mozilla.org/mozilla/source/mailnews/mailnews/imap/src/nsImapService#2727 So it seems that nsIMsgAccountManager::FindServer() is returning success but leaving the out parameter null, here http://lxr.mozilla.org/mozilla/source/mailnews/mailnews/imap/src/nsImapService#2721 This seems to be a pretty obvious code-level problem: according to alecf, FindServer() is allowed to return null. I can't tell you how to reproduce it. Read mail for a while ;-).
these links are actually bogus. Be sure to insert .cpp if you want to look at them. load balancing to jeff. I've been reading mail all day with a tip build and haven't seen this crash yet. I'm not sure why waterson is so lucky!
Assignee: mscott → jefft
Summary: IMAP does not check result param from nsIMsgAccountManager::FindServer() → IMAP does not check result param from nsIMsgAccountManager::FindServer()
accepting.. adding crash keyword...
Status: NEW → ASSIGNED
Keywords: crash
Target Milestone: --- → M17
Attached patch A safety guard.Splinter Review
Thanks Jeff Actually, why don't you put NS_ENSURE_TRUE(aServer, NS_ERROR_FAILURE); that way one of us can catch the assertion if we ever see it
Even better, Alec. I will do so.
nominating for nsbeta2 given that we have a fix that will prevent a crash that can occur when reading messages.
Keywords: nsbeta2
fix checked in.
Status: ASSIGNED → RESOLVED
Closed: 25 years ago
Resolution: --- → FIXED
Old bug. Can not re-produce the problem. Let's close it.
Status: RESOLVED → VERIFIED
Product: MailNews → Core
Product: Core → MailNews Core
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: