Bug 48100 - YARR allows what seems like a bogus character-class range
Summary: YARR allows what seems like a bogus character-class range
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: JavaScriptCore (show other bugs)
Version: 528+ (Nightly build)
Hardware: PC OS X 10.5
: P2 Normal
Assignee: Gavin Barraclough
URL: https://bugzilla.mozilla.org/show_bug...
Keywords:
Depends on:
Blocks: 50320
  Show dependency treegraph
 
Reported: 2010-10-21 16:33 PDT by Oliver Hunt
Modified: 2011-01-04 19:57 PST (History)
0 users

See Also:


Attachments
The patch (32.54 KB, patch)
2010-11-29 00:11 PST, Gavin Barraclough
sam: review+
Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Oliver Hunt 2010-10-21 16:33:09 PDT
[reply] [-] Description Jesse Ruderman 2010-07-04 00:29:26 PDT
/[C-\s]/;

YARR: accepts it
OLD:  "invalid range in character class"
[reply] [-] Comment 1 Jesse Ruderman 2010-07-04 00:50:15 PDT
Same with /[f-\d]/
Comment 1 Oliver Hunt 2010-10-25 15:18:47 PDT
https://bugzilla.mozilla.org/show_bug.cgi?id=576837 has a fix for this but it would need to be merged
Comment 2 Gavin Barraclough 2010-11-29 00:11:34 PST
Created attachment 74993 [details]
The patch
Comment 3 Sam Weinig 2010-11-29 08:37:11 PST
Comment on attachment 74993 [details]
The patch

View in context: https://bugs.webkit.org/attachment.cgi?id=74993&action=review

> JavaScriptCore/yarr/RegexParser.h:205
>              empty,
>              cachedCharacter,
>              cachedCharacterHyphen,
> +            afterCharacterClass,
> +            afterCharacterClassHyphen,

Eek. This enum should have initial capital letters.
Comment 4 Gavin Barraclough 2010-11-29 11:00:59 PST
Fixed in r72813.