Closed Bug 14707 Opened 25 years ago Closed 25 years ago

-1 passed where unsigned is required

Categories

(Core :: Networking, defect, P3)

defect

Tracking

()

VERIFIED FIXED

People

(Reporter: colin, Assigned: gagan)

References

Details

Attachments

(1 file)

In netwerk/base/src/nsStdURL.cpp is the following line of code (twice): ExtractString(mSpec, &mHost, -1, -1); The function ExtractString has the third and fourth args defined as UNsigned, so I have no idea what's happening when -1 gets passed in. Colin.
Target Milestone: M12
Blocks: 13449
The intention here is to clear mHost. I think 0, 0 should be passed. The arguments in question are pos and length and ExtractString will abort after freeing the destination if length == 0. I will do some tests.
The intention here is to clear mHost. I think 0, 0 should be passed. The arguments in question are pos and length and ExtractString will abort after freeing the destination if length == 0. I will do some tests.
I don't believe I'm qualified to review this fix. You're not asking me to review the fix, right?
I think you can do that. Just look what happens when ExtractString is called with 0,0 instead of -1,-1. The purpose is to clean out the string. But gagan should have the final call ...
Status: NEW → ASSIGNED
Actually I just fixed this (still sitting in my tree) the call really needed to be replaced by CRTFREEIF(mHost) which will clear it. Sorry it took me this long to get to this bug.
Status: ASSIGNED → RESOLVED
Closed: 25 years ago
Resolution: --- → FIXED
Bulk move of all Necko (to be deleted component) bugs to new Networking component.
Status: RESOLVED → VERIFIED
verified
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: