From 703be4f77e662837b64499b0d046a5c8d06a98b9 Mon Sep 17 00:00:00 2001 From: Remi Collet Date: Tue, 30 May 2017 15:40:32 +0200 Subject: Patch from the upstream git https://github.com/kkos/oniguruma/issues/60 (CVE-2017-9228) Thanks to Mamoru TASAKA --- ext/mbstring/oniguruma/regparse.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/ext/mbstring/oniguruma/regparse.c b/ext/mbstring/oniguruma/regparse.c index c6822e6267..d2925f1e81 100644 --- a/ext/mbstring/oniguruma/regparse.c +++ b/ext/mbstring/oniguruma/regparse.c @@ -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; } -- cgit v1.2.1