Bug 153964

Summary: String.match should defend against matches that would crash the VM
Product: WebKit Reporter: Filip Pizlo <fpizlo>
Component: JavaScriptCoreAssignee: Filip Pizlo <fpizlo>
Status: RESOLVED FIXED    
Severity: Normal CC: commit-queue, keith_miller, mark.lam, msaboff, oliver, saam
Priority: P2    
Version: WebKit Nightly Build   
Hardware: All   
OS: All   
Attachments:
Description Flags
the patch saam: review+

Description Filip Pizlo 2016-02-07 10:16:13 PST
Patch forthcoming.
Comment 1 Filip Pizlo 2016-02-07 10:21:04 PST
Created attachment 270825 [details]
the patch
Comment 2 Saam Barati 2016-02-07 10:48:21 PST
Comment on attachment 270825 [details]
the patch

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

LGTM

> Source/JavaScriptCore/runtime/StringPrototype.cpp:1000
> +        size_t maximumReasonableMatchSize = 1000000000;

You could make this const.
Comment 3 Filip Pizlo 2016-02-07 11:01:47 PST
(In reply to comment #2)
> Comment on attachment 270825 [details]
> the patch
> 
> View in context:
> https://bugs.webkit.org/attachment.cgi?id=270825&action=review
> 
> LGTM
> 
> > Source/JavaScriptCore/runtime/StringPrototype.cpp:1000
> > +        size_t maximumReasonableMatchSize = 1000000000;
> 
> You could make this const.

OK!
Comment 4 Filip Pizlo 2016-02-07 11:03:56 PST
Landed in http://trac.webkit.org/changeset/196240