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

Thanks to Mamoru TASAKA <mtasaka@fedoraproject.org>

ext/mbstring/oniguruma/regexec.c

index 7430d7851491cbf8fe43027dde08b9f1191a6ee2..5e26896e365d8fc2adb4db23c8e71c809b6c0468 100644 (file)
@@ -1425,14 +1425,9 @@ match_at(regex_t* reg, const UChar* str, const UChar* end,
       break;
 
     case OP_EXACT1:  MOP_IN(OP_EXACT1);
-#if 0
       DATA_ENSURE(1);
       if (*p != *s) goto fail;
       p++; s++;
-#endif
-      if (*p != *s++) goto fail;
-      DATA_ENSURE(0);
-      p++;
       MOP_OUT;
       break;