]> granicus.if.org Git - php/commitdiff
Patch from the upstream git
authorRemi Collet <remi@php.net>
Tue, 30 May 2017 13:40:32 +0000 (15:40 +0200)
committerRemi Collet <remi@php.net>
Wed, 5 Jul 2017 07:26:06 +0000 (09:26 +0200)
https://github.com/kkos/oniguruma/issues/60 (CVE-2017-9228)

Thanks to Mamoru TASAKA <mtasaka@fedoraproject.org>

ext/mbstring/oniguruma/regparse.c

index c6822e6267f1564177400a8e82c33e717755be1a..d2925f1e81b0bb827db02b260cca1058355135d2 100644 (file)
@@ -4068,7 +4068,9 @@ next_state_class(CClassNode* cc, OnigCodePoint* vs, enum CCVALTYPE* type,
     }
   }
 
-  *state = CCS_VALUE;
+  if (*state != CCS_START)
+    *state = CCS_VALUE;
+
   *type  = CCV_CLASS;
   return 0;
 }