Closed Bug 309430 Opened 17 years ago Closed 15 years ago

potential oom crash [@ xptiInterfaceInfoManager::GetInterfaceInfoManagerNoAddRef]

Categories

(Core :: XPCOM, defect)

defect
Not set
normal

Tracking

()

RESOLVED FIXED
mozilla1.9beta3

People

(Reporter: dewildt, Assigned: dewildt)

References

()

Details

(Keywords: crash)

Crash Data

Attachments

(1 file, 1 obsolete file)

71         gInterfaceInfoManager = new xptiInterfaceInfoManager(searchPath);
 72         if(gInterfaceInfoManager)
 73             NS_ADDREF(gInterfaceInfoManager);
 74         if(!gInterfaceInfoManager->IsValid())

If the "new" in line 71 fails, then we will crash in line 74.
Blocks: 309535
Attached patch Add null check (obsolete) — Splinter Review
This patch returns nsnull if xptiInterfaceInfoManager could not instantiated.
Assignee: dougt → dewildt
Status: NEW → ASSIGNED
Attachment #196945 - Flags: review?(dougt)
Comment on attachment 196945 [details] [diff] [review]
Add null check

Lets also add an NS_ERROR above the return.

DougT
Attachment #196945 - Flags: review?(dougt) → review+
Doug, does this error work for you?
Attachment #196945 - Attachment is obsolete: true
Attachment #295697 - Flags: review?
Attachment #295697 - Flags: review? → review?(dougt)
Comment on attachment 295697 [details] [diff] [review]
Add NS_ERROR to previous patch

Looks good.
Attachment #295697 - Flags: review?(dougt)
Attachment #295697 - Flags: review+
Attachment #295697 - Flags: approval1.9?
Attachment #295697 - Flags: approval1.9? → approval1.9+
Keywords: checkin-needed
Checking in xpcom/reflect/xptinfo/src/xptiInterfaceInfoManager.cpp;
/cvsroot/mozilla/xpcom/reflect/xptinfo/src/xptiInterfaceInfoManager.cpp,v  <--  xptiInterfaceInfoManager.cpp
new revision: 1.61; previous revision: 1.60
done
Status: ASSIGNED → RESOLVED
Closed: 15 years ago
Keywords: checkin-needed
OS: Windows 2000 → All
Hardware: PC → All
Resolution: --- → FIXED
Target Milestone: --- → mozilla1.9 M11
Flags: in-testsuite?
Duplicate of this bug: 399342
Crash Signature: [@ xptiInterfaceInfoManager::GetInterfaceInfoManagerNoAddRef]
Flags: in-testsuite?
You need to log in before you can comment on or make changes to this bug.