nsStringAPI.h: StringBegins/EndsWith inconsistent with nsReadableUtils.cpp

RESOLVED FIXED

Status

()

Core
XPCOM
--
minor
RESOLVED FIXED
11 years ago
11 years ago

People

(Reporter: neil@parkwaycc.co.uk, Assigned: neil@parkwaycc.co.uk)

Tracking

Trunk
Points:
---
Bug Flags:
in-testsuite ?

Firefox Tracking Flags

(Not tracked)

Details

(URL)

Attachments

(1 attachment)

(Assignee)

Description

11 years ago
nsReadableUtils.cpp checks that the substring is shorter than the source string before matching against its head/tail. nsStringAPI.h does not.

Note that in neither API does StringHead/Tail validate the new length.
(Assignee)

Comment 1

11 years ago
Created attachment 263354 [details] [diff] [review]
Proposed patch
Assignee: nobody → neil
Status: NEW → ASSIGNED
Attachment #263354 - Flags: superreview?(darin.moz)
Attachment #263354 - Flags: review?(benjamin)

Updated

11 years ago
Attachment #263354 - Flags: review?(benjamin) → review+

Updated

11 years ago
Attachment #263354 - Flags: superreview?(darin.moz) → superreview+
(Assignee)

Comment 2

11 years ago
Fix checked in.
Status: ASSIGNED → RESOLVED
Last Resolved: 11 years ago
Resolution: --- → FIXED

Updated

11 years ago
Flags: in-testsuite?
(Assignee)

Comment 3

11 years ago
Fix checked in two days ago but I forgot to mark the bug fixed :-\
You need to log in before you can comment on or make changes to this bug.