diff options
Diffstat (limited to 'meta/recipes-devtools/ruby/ruby/CVE-2017-9229.patch')
-rw-r--r-- | meta/recipes-devtools/ruby/ruby/CVE-2017-9229.patch | 36 |
1 files changed, 0 insertions, 36 deletions
diff --git a/meta/recipes-devtools/ruby/ruby/CVE-2017-9229.patch b/meta/recipes-devtools/ruby/ruby/CVE-2017-9229.patch deleted file mode 100644 index 75bdfada57..0000000000 --- a/meta/recipes-devtools/ruby/ruby/CVE-2017-9229.patch +++ /dev/null | |||
@@ -1,36 +0,0 @@ | |||
1 | commit b690371bbf97794b4a1d3f295d4fb9a8b05d402d | ||
2 | Author: K.Kosako <kosako@sofnec.co.jp> | ||
3 | Date: Wed May 24 10:27:04 2017 +0900 | ||
4 | |||
5 | fix #59 : access to invalid address by reg->dmax value | ||
6 | |||
7 | Upstream-Status: Backport | ||
8 | |||
9 | CVE: CVE-2017-9229 | ||
10 | Signed-off-by: Thiruvadi Rajaraman <trajaraman@mvista.com> | ||
11 | |||
12 | Index: ruby-2.2.5/regexec.c | ||
13 | =================================================================== | ||
14 | --- ruby-2.2.5.orig/regexec.c 2017-09-13 12:17:08.429254209 +0530 | ||
15 | +++ ruby-2.2.5/regexec.c 2017-09-13 12:24:03.365312311 +0530 | ||
16 | @@ -3763,6 +3763,12 @@ | ||
17 | } | ||
18 | else { | ||
19 | if (reg->dmax != ONIG_INFINITE_DISTANCE) { | ||
20 | + if (p - str < reg->dmax) { | ||
21 | + *low = (UChar* )str; | ||
22 | + if (low_prev) | ||
23 | + *low_prev = onigenc_get_prev_char_head(reg->enc, str, *low, end); | ||
24 | + } | ||
25 | + else { | ||
26 | *low = p - reg->dmax; | ||
27 | if (*low > s) { | ||
28 | *low = onigenc_get_right_adjust_char_head_with_prev(reg->enc, s, | ||
29 | @@ -3776,6 +3782,7 @@ | ||
30 | *low_prev = onigenc_get_prev_char_head(reg->enc, | ||
31 | (pprev ? pprev : str), *low, end); | ||
32 | } | ||
33 | + } | ||
34 | } | ||
35 | } | ||
36 | /* no needs to adjust *high, *high is used as range check only */ | ||