summaryrefslogtreecommitdiff
path: root/dev-libs/oniguruma/files/oniguruma-5.9.6-CVE-2017-9227.patch
blob: 580cc14467915c764ce236ea6817f3d20a3e2837 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
https://github.com/kkos/oniguruma/issues/58
https://github.com/kkos/oniguruma/commit/9690d3ab1f9bcd2db8cbe1fe3ee4a5da606b8814

Author: K.Kosako <kosako@sofnec.co.jp>

--- a/regexec.c
+++ b/regexec.c
@@ -3154,6 +3154,8 @@
     }
     else {
       UChar *q = p + reg->dmin;
+
+      if (q >= end) return 0; /* fail */
       while (p < q) p += enclen(reg->enc, p);
     }
   }