Reviewed by Eric.
authoraroben@apple.com <aroben@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Sat, 1 Dec 2007 02:25:07 +0000 (02:25 +0000)
committeraroben@apple.com <aroben@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Sat, 1 Dec 2007 02:25:07 +0000 (02:25 +0000)
        * ChangeLog:
        * pcre/pcre_compile.cpp:
        (compile_branch):

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@28272 268f45cc-cd09-0410-ab3c-d52691b4dbfc

JavaScriptCore/ChangeLog
JavaScriptCore/pcre/pcre_compile.cpp

index 0249284..a5fd208 100644 (file)
@@ -1,3 +1,11 @@
+2007-11-30  Brent Fulgham  <bfulgham@gmail.com>
+
+        Reviewed by Eric.
+
+        * ChangeLog:
+        * pcre/pcre_compile.cpp:
+        (compile_branch):
+
 2007-11-30  Eric Seidel  <eric@webkit.org>
 
         No review, build fix only.
index 72f995b..b21706f 100644 (file)
@@ -869,8 +869,10 @@ compile_branch(int options, int* brackets, uschar** codeptr,
                 
                 /* If the first character is '^', set the negation flag and skip it. */
 
-                if (ptr + 1 >= patternEnd)
-                    return -1;
+                if (ptr + 1 >= patternEnd) {
+                    *errorcodeptr = ERR6;
+                    return false;
+                }
 
                 if (ptr[1] == '^') {
                     negate_class = true;