Show
Ignore:
Timestamp:
03/27/08 23:41:17 (8 months ago)
Author:
mrowe@apple.com
Message:

2008-03-27 Darin Adler <darin@apple.com>

Reviewed by Mark Rowe.

<rdar://problem/5826236> Regular expressions with large nested repetition counts can have their
compiled length calculated incorrectly.

  • pcre/pcre_compile.cpp: (multiplyWithOverflowCheck): (calculateCompiledPatternLength): Check for overflow when dealing with nested repetition counts and bail with an error rather than returning incorrect results.

2008-03-27 Mark Rowe <mrowe@apple.com>

Reviewed by Adam Roben.

Tests for <rdar://problem/5826236> Regular expressions with large nested repetition counts can have their
compiled length calculated incorrectly.

  • fast/js/regexp-overflow-expected.txt:
  • fast/js/resources/regexp-overflow.js:
Files:
1 modified

Legend:

Unmodified
Added
Removed
  • trunk/JavaScriptCore/ChangeLog

    r31353 r31388  
     12008-03-27  Darin Adler  <darin@apple.com> 
     2 
     3        Reviewed by Mark Rowe. 
     4 
     5        <rdar://problem/5826236> Regular expressions with large nested repetition counts can have their 
     6        compiled length calculated incorrectly. 
     7 
     8        * pcre/pcre_compile.cpp: 
     9        (multiplyWithOverflowCheck): 
     10        (calculateCompiledPatternLength): Check for overflow when dealing with nested repetition counts 
     11        and bail with an error rather than returning incorrect results. 
     12 
    1132008-03-26  Mark Rowe  <mrowe@apple.com> 
    214