Changeset 205937 in webkit
- Timestamp:
- Sep 14, 2016 4:17:59 PM (8 years ago)
- Location:
- trunk
- Files:
-
- 1 added
- 5 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/JSTests/ChangeLog
r205932 r205937 1 2016-09-14 Michael Saboff <msaboff@apple.com> 2 3 YARR doesn't check for invalid flags for literal regular expressions 4 https://bugs.webkit.org/show_bug.cgi?id=161995 5 6 Reviewed by Mark Lam. 7 8 New test. 9 10 * stress/regress-161995.js: Added. 11 (testStatic): 12 (catch): 13 1 14 2016-09-14 Joseph Pecoraro <pecoraro@apple.com> 2 15 -
trunk/Source/JavaScriptCore/ChangeLog
r205936 r205937 1 2016-09-14 Michael Saboff <msaboff@apple.com> 2 3 YARR doesn't check for invalid flags for literal regular expressions 4 https://bugs.webkit.org/show_bug.cgi?id=161995 5 6 Reviewed by Mark Lam. 7 8 Added a new error and a check that the flags are valid when we create a 9 literal regular expression. 10 11 * runtime/RegExp.cpp: 12 (JSC::RegExp::finishCreation): 13 * yarr/YarrPattern.cpp: 14 (JSC::Yarr::YarrPattern::errorMessage): 15 (JSC::Yarr::YarrPattern::compile): 16 * yarr/YarrPattern.h: 17 1 18 2016-09-14 Keith Miller <keith_miller@apple.com> 2 19 -
trunk/Source/JavaScriptCore/runtime/RegExp.cpp
r205462 r205937 224 224 Base::finishCreation(vm); 225 225 Yarr::YarrPattern pattern(m_patternString, m_flags, &m_constructionError, vm.stackLimit()); 226 if ( m_constructionError)226 if (!isValid()) 227 227 m_state = ParseError; 228 228 else -
trunk/Source/JavaScriptCore/yarr/YarrPattern.cpp
r203452 r205937 908 908 REGEXP_ERROR_PREFIX "invalid escaped character for unicode pattern", 909 909 REGEXP_ERROR_PREFIX "too many nested disjunctions", 910 REGEXP_ERROR_PREFIX "pattern exceeds string length limits" 910 REGEXP_ERROR_PREFIX "pattern exceeds string length limits", 911 REGEXP_ERROR_PREFIX "invalid flags" 911 912 }; 912 913 … … 917 918 { 918 919 YarrPatternConstructor constructor(*this, stackLimit); 920 921 if (m_flags == InvalidFlags) 922 return errorMessage(InvalidRegularExpressionFlags); 919 923 920 924 if (const char* error = parse(constructor, patternString, unicode())) -
trunk/Source/JavaScriptCore/yarr/YarrPattern.h
r205020 r205937 322 322 TooManyDisjunctions, 323 323 OffsetTooLarge, 324 InvalidRegularExpressionFlags, 324 325 NumberOfErrorCodes 325 326 };
Note: See TracChangeset
for help on using the changeset viewer.