Revert "Revert "oran-shell-release: release image for F""
[pti/rtp.git] / meta-starlingx / meta-stx-integ / recipes-devtools / ruby / ruby / ruby-CVE-2017-9228.patch
1 From 3b63d12038c8d8fc278e81c942fa9bec7c704c8b Mon Sep 17 00:00:00 2001
2 From: "K.Kosako" <kosako@sofnec.co.jp>
3 Date: Wed, 24 May 2017 13:43:25 +0900
4 Subject: [PATCH] fix #60 : invalid state(CCS_VALUE) in parse_char_class()
5
6 ---
7  regparse.c |    4 +++-
8  1 file changed, 3 insertions(+), 1 deletion(-)
9
10 --- end of original header
11
12 CVE: CVE-2017-9228
13
14 Upstream-Status: Inappropriate [not author]
15 Signed-off-by: Joe Slater <joe.slater@windriver.com>
16
17 diff --git a/regparse.c b/regparse.c
18 index 69875fa..1988747 100644
19 --- a/regparse.c
20 +++ b/regparse.c
21 @@ -4081,7 +4081,9 @@ next_state_class(CClassNode* cc, OnigCodePoint* vs, enum CCVALTYPE* type,
22      }
23    }
24  
25 -  *state = CCS_VALUE;
26 +  if (*state != CCS_START)
27 +    *state = CCS_VALUE;
28 +
29    *type  = CCV_CLASS;
30    return 0;
31  }
32 -- 
33 1.7.9.5
34