Closed
Bug 620405
Opened 15 years ago
Closed 10 years ago
crash [@ nsStandardURL::SegmentIs] if !val && !mSpec.IsEmpty()
Categories
(Core :: Networking, defect)
Core
Networking
Tracking
()
RESOLVED
WORKSFORME
People
(Reporter: timeless, Assigned: timeless)
References
(Blocks 1 open bug)
Details
(Keywords: coverity, crash, Whiteboard: [necko-backlog])
Crash Data
Attachments
(1 file)
|
780 bytes,
patch
|
Biesinger
:
review+
jst
:
approval2.0-
|
Details | Diff | Splinter Review |
708 PRBool
709 nsStandardURL::SegmentIs(const URLSegment &seg1, const char *val, const URLSegment &seg2, PRBool ignoreCase)
710 {
711 if (seg1.mLen != seg2.mLen)
712 return PR_FALSE;
this is the wrong set of tests:
713 if (seg1.mLen == -1 || (!val && mSpec.IsEmpty()))
714 return PR_TRUE; // both are empty
715 if (ignoreCase)
716 return !PL_strncasecmp(mSpec.get() + seg1.mPos, val + seg2.mPos, seg1.mLen);
717 else
718 return !strncmp(mSpec.get() + seg1.mPos, val + seg2.mPos, seg1.mLen);
719 }
Assignee: nobody → timeless
Status: NEW → ASSIGNED
Attachment #498750 -
Flags: review?(cbiesinger)
Attachment #498750 -
Flags: approval2.0?
Comment 2•15 years ago
|
||
Comment on attachment 498750 [details] [diff] [review]
patch
Mass minusing patch approval that don't have high return. Please renominate if this is more important for 2.0 than it appears.
Attachment #498750 -
Flags: approval2.0? → approval2.0-
Updated•15 years ago
|
Crash Signature: [@ nsStandardURL::SegmentIs]
Updated•15 years ago
|
Attachment #498750 -
Flags: review?(cbiesinger) → review+
Comment 3•10 years ago
|
||
valentin, do we want this patch? reoslve the bug?
Flags: needinfo?(valentin.gosu)
Whiteboard: [necko-backlog]
Comment 4•10 years ago
|
||
We already have:
> if (seg1.mLen == -1 || (!val && mSpec.IsEmpty()))
> return true; // both are empty
> if (!val)
> return false;
This is essentially the same.
Status: ASSIGNED → RESOLVED
Closed: 10 years ago
Flags: needinfo?(valentin.gosu)
Resolution: --- → WORKSFORME
Updated•8 years ago
|
Blocks: coverity-analysis
You need to log in
before you can comment on or make changes to this bug.
Description
•