Closed Bug 290239 Opened 20 years ago Closed 20 years ago

various hazards in do_CreateInstanceFromCategory

Categories

(Core :: XPCOM, defect)

x86
Linux
defect
Not set
normal

Tracking

()

RESOLVED FIXED

People

(Reporter: shaver, Assigned: shaver)

References

Details

Attachments

(1 file)

1) mOuter is never initialized, so you always end up trying to aggregate against a random stack pointer. 2) we test rv after performing the createInstance in operator(), but don't actually set it based on that call 3) unconditionally store through mErrorPtr, though it can trivially be null. Patch coming up for these woes. (No wonder nobody uses it!)
Attached patch 3 fixesSplinter Review
All of these are my bugs, natch.
Attachment #180638 - Flags: superreview?(benjamin)
Attachment #180638 - Flags: review?(benjamin)
Attachment #180638 - Flags: approval1.8b2?
Comment on attachment 180638 [details] [diff] [review] 3 fixes I'm not an XPCOM peer, so darin or dougt needs to review also.
Attachment #180638 - Flags: superreview?(darin)
Attachment #180638 - Flags: superreview?(benjamin)
Attachment #180638 - Flags: review?(benjamin)
Attachment #180638 - Flags: review+
Comment on attachment 180638 [details] [diff] [review] 3 fixes >Index: components/nsComponentManager.cpp >+ rv = compMgr->CreateInstanceByContractID(value, > mOuter, > aIID, > aInstancePtr); nit: please fix parameter alignment while here. sr=darin
Attachment #180638 - Flags: superreview?(darin) → superreview+
Comment on attachment 180638 [details] [diff] [review] 3 fixes a=brendan for 1.8b2. /be
Attachment #180638 - Flags: approval1.8b2? → approval1.8b2+
Blocks: 290247
Fixed, thanks all for speedy reviews.
Status: NEW → RESOLVED
Closed: 20 years ago
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: