Closed
Bug 85981
Opened 24 years ago
Closed 24 years ago
nsStdURL::SchemeIs() method doesn't check for null mScheme
Categories
(Core :: Networking, defect, P3)
Tracking
()
VERIFIED
FIXED
mozilla0.9.2
People
(Reporter: cmanske, Assigned: dougt)
References
Details
(Keywords: crash)
Attachments
(1 file)
702 bytes,
patch
|
Details | Diff | Splinter Review |
If you make an nsIURI with a URL that doesn't exist, it seems mScheme is null.
It seems that in this line of nsStdURL::SchemeIs():
if ( *i_Scheme == *mScheme || *i_Scheme == (*mScheme - ('a' - 'A')) ) {
we should always check for null mScheme.
This is hard to demonstrate, but I discovered it testing the fix to bug 78351.
It's kind of messy, because you have to apply fixes to bug 78351, bug 76177,
and bug 82435 before you can get the crash! If you do that, here's how to show
it:
Bring up a composer window, click on Image button to bring up dialog.
Type "xxxxxxxxx.gif" and BAM!
I don't know anything about this code, but looking at nsStdURL.cpp, it
certainly looks like there's plenty of opportunity to have a null mScheme,
so checking it certainly seems the right thing to do!
Reporter | ||
Comment 1•24 years ago
|
||
Since this is a crasher and blocker, I'm going to take the liberty of marking
it "0.9.2"
Reporter | ||
Comment 2•24 years ago
|
||
Reporter | ||
Comment 3•24 years ago
|
||
Valeski is not around. Reassigning to Radha
Assignee: valeski → radha
Whiteboard: FIX IN HAND need r=, sr=, a=
sr=kin@netscape.com if you get an r= from a module owner/peer.
Whiteboard: FIX IN HAND need r=, sr=, a= → FIX IN HAND need r=, a=
Comment 5•24 years ago
|
||
this is necko. it should be assigned to gagan or dougt or darin.
Assignee: radha → gagan
Comment 6•24 years ago
|
||
I'm filling in for Jud, when he is not here, but I'm not the module owner for
this code. Though the changes look OK to me, It think it is not PC for me to
give a review. I also suggest you try dougt/darin/gagan for a review.
r=gagan, get an sr/a and land this in soon...
Whiteboard: FIX IN HAND need r=, a= → FIX IN HAND need sr=, a=
Already sr'd just get a= from drivers@mozilla.org.
Whiteboard: FIX IN HAND need sr=, a= → FIX IN HAND need a=
Comment 9•24 years ago
|
||
a= asa@mozilla.org for checkin to the trunk.
(on behalf of drivers)
Reporter | ||
Comment 10•24 years ago
|
||
Might as well assign to me since I fixed it.
Reporter | ||
Comment 11•24 years ago
|
||
Fix checked in.
Status: NEW → RESOLVED
Closed: 24 years ago
Resolution: --- → FIXED
Whiteboard: FIX IN HAND need a=
Assignee | ||
Comment 12•24 years ago
|
||
WAIT!!!! This is NOT something that we want to do!!! The scheme should never be
null.
I am workin on changing the callers so that this is impossible. Now, I am going
to have to back this out.... reopening and reassigning...
Status: RESOLVED → REOPENED
Resolution: FIXED → ---
Assignee | ||
Comment 13•24 years ago
|
||
dougt, back this out.
Assignee: gagan → dougt
Status: REOPENED → NEW
Reporter | ||
Comment 14•24 years ago
|
||
Ok, as long a mScheme is assured of being non-null. Maybe adding an assertion
would be a good idea?
Assignee | ||
Updated•24 years ago
|
Priority: -- → P3
Assignee | ||
Comment 15•24 years ago
|
||
fixed checked in.
Status: NEW → RESOLVED
Closed: 24 years ago → 24 years ago
Resolution: --- → FIXED
Comment 16•24 years ago
|
||
Verified on:
Win2K: 2001-07-27-00-0.9.2
2001-07-27-12-trunk
MacOS: 2001-07-26-21-0.9.2
Linux: 2001-07-26-23-0.9.2
Status: RESOLVED → VERIFIED
You need to log in
before you can comment on or make changes to this bug.
Description
•