1 Index: icu/source/i18n/regexcmp.cpp
2 ===================================================================
3 --- icu/source/i18n/regexcmp.cpp (revision 36723)
4 +++ icu/source/i18n/regexcmp.cpp (revision 36724)
6 int32_t minML = minMatchLength(fMatchOpenParen, patEnd);
7 int32_t maxML = maxMatchLength(fMatchOpenParen, patEnd);
8 + if (URX_TYPE(maxML) != 0) {
9 + error(U_REGEX_LOOK_BEHIND_LIMIT);
12 if (maxML == INT32_MAX) {
13 error(U_REGEX_LOOK_BEHIND_LIMIT);
15 int32_t minML = minMatchLength(fMatchOpenParen, patEnd);
16 int32_t maxML = maxMatchLength(fMatchOpenParen, patEnd);
17 + if (URX_TYPE(maxML) != 0) {
18 + error(U_REGEX_LOOK_BEHIND_LIMIT);
21 if (maxML == INT32_MAX) {
22 error(U_REGEX_LOOK_BEHIND_LIMIT);
23 Index: icu/source/test/testdata/regextst.txt
24 ===================================================================
25 --- icu/source/test/testdata/regextst.txt (revision 36723)
26 +++ icu/source/test/testdata/regextst.txt (revision 36724)
27 @@ -1201,4 +1201,12 @@
28 "A|B|\U00012345" "hello <0>\U00012345</0>"
29 "A|B|\U00010000" "hello \ud800"
32 +# Max match length computation of look-behind expression gives result that is too big to fit in the
33 +# in the 24 bit operand portion of the compiled code. Expressions should fail to compile
34 +# (Look-behind match length must be bounded. This case is treated as unbounded, an error.)
36 +"(?<!(0123456789a){10000000})x" E "no match"
37 +"(?<!\\ubeaf(\\ubeaf{11000}){11000})" E "no match"
39 # Random debugging, Temporary