Skip to content

Commit 2a76d22

Browse files
committed
upgrade to Oniguruma 6.1.2
1 parent 35a3c6e commit 2a76d22

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

93 files changed

+44569
-18196
lines changed

ext/mbstring/config.m4

+53-41
Original file line numberDiff line numberDiff line change
@@ -108,49 +108,61 @@ int main() { return foo(10, "", 3.14); }
108108
PHP_MBSTRING_ADD_BUILD_DIR([oniguruma])
109109
PHP_MBSTRING_ADD_BUILD_DIR([oniguruma/enc])
110110
PHP_MBSTRING_ADD_INCLUDE([oniguruma])
111-
PHP_MBSTRING_ADD_CONFIG_HEADER([oniguruma/config.h])
111+
PHP_MBSTRING_ADD_CONFIG_HEADER([oniguruma/src/config.h])
112112
PHP_MBSTRING_ADD_SOURCES([
113-
oniguruma/regcomp.c
114-
oniguruma/regerror.c
115-
oniguruma/regexec.c
116-
oniguruma/reggnu.c
117-
oniguruma/regparse.c
118-
oniguruma/regenc.c
119-
oniguruma/regext.c
120-
oniguruma/regsyntax.c
121-
oniguruma/regtrav.c
122-
oniguruma/regversion.c
123-
oniguruma/st.c
124-
oniguruma/enc/unicode.c
125-
oniguruma/enc/ascii.c
126-
oniguruma/enc/utf8.c
127-
oniguruma/enc/euc_jp.c
128-
oniguruma/enc/euc_tw.c
129-
oniguruma/enc/euc_kr.c
130-
oniguruma/enc/sjis.c
131-
oniguruma/enc/iso8859_1.c
132-
oniguruma/enc/iso8859_2.c
133-
oniguruma/enc/iso8859_3.c
134-
oniguruma/enc/iso8859_4.c
135-
oniguruma/enc/iso8859_5.c
136-
oniguruma/enc/iso8859_6.c
137-
oniguruma/enc/iso8859_7.c
138-
oniguruma/enc/iso8859_8.c
139-
oniguruma/enc/iso8859_9.c
140-
oniguruma/enc/iso8859_10.c
141-
oniguruma/enc/iso8859_11.c
142-
oniguruma/enc/iso8859_13.c
143-
oniguruma/enc/iso8859_14.c
144-
oniguruma/enc/iso8859_15.c
145-
oniguruma/enc/iso8859_16.c
146-
oniguruma/enc/koi8.c
147-
oniguruma/enc/koi8_r.c
148-
oniguruma/enc/big5.c
149-
oniguruma/enc/utf16_be.c
150-
oniguruma/enc/utf16_le.c
151-
oniguruma/enc/utf32_be.c
152-
oniguruma/enc/utf32_le.c
113+
oniguruma/src/ascii.c
114+
oniguruma/src/big5.c
115+
oniguruma/src/cp1251.c
116+
oniguruma/src/euc_jp.c
117+
oniguruma/src/euc_jp_prop.c
118+
oniguruma/src/euc_kr.c
119+
oniguruma/src/euc_tw.c
120+
oniguruma/src/gb18030.c
121+
oniguruma/src/iso8859_1.c
122+
oniguruma/src/iso8859_10.c
123+
oniguruma/src/iso8859_11.c
124+
oniguruma/src/iso8859_13.c
125+
oniguruma/src/iso8859_14.c
126+
oniguruma/src/iso8859_15.c
127+
oniguruma/src/iso8859_16.c
128+
oniguruma/src/iso8859_2.c
129+
oniguruma/src/iso8859_3.c
130+
oniguruma/src/iso8859_4.c
131+
oniguruma/src/iso8859_5.c
132+
oniguruma/src/iso8859_6.c
133+
oniguruma/src/iso8859_7.c
134+
oniguruma/src/iso8859_8.c
135+
oniguruma/src/iso8859_9.c
136+
oniguruma/src/koi8.c
137+
oniguruma/src/koi8_r.c
138+
oniguruma/src/onig_init.c
139+
oniguruma/src/regcomp.c
140+
oniguruma/src/regenc.c
141+
oniguruma/src/regerror.c
142+
oniguruma/src/regexec.c
143+
oniguruma/src/regext.c
144+
oniguruma/src/reggnu.c
145+
oniguruma/src/regparse.c
146+
oniguruma/src/regposerr.c
147+
oniguruma/src/regposix.c
148+
oniguruma/src/regsyntax.c
149+
oniguruma/src/regtrav.c
150+
oniguruma/src/regversion.c
151+
oniguruma/src/sjis.c
152+
oniguruma/src/sjis_prop.c
153+
oniguruma/src/st.c
154+
oniguruma/src/unicode.c
155+
oniguruma/src/unicode_fold1_key.c
156+
oniguruma/src/unicode_fold2_key.c
157+
oniguruma/src/unicode_fold3_key.c
158+
oniguruma/src/unicode_unfold_key.c
159+
oniguruma/src/utf16_be.c
160+
oniguruma/src/utf16_le.c
161+
oniguruma/src/utf32_be.c
162+
oniguruma/src/utf32_le.c
163+
oniguruma/src/utf8.c
153164
])
165+
cp $ext_builddir/oniguruma/src/oniguruma.h $ext_builddir/oniguruma/oniguruma.h
154166
PHP_MBSTRING_ADD_INSTALL_HEADERS([oniguruma/oniguruma.h])
155167
else
156168
dnl

ext/mbstring/config.w32

+11-12
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,9 @@ if (PHP_MBSTRING != "no") {
1010

1111
EXTENSION("mbstring", "mbstring.c php_unicode.c mb_gpc.c", PHP_MBSTRING_SHARED);
1212

13+
FSO.CopyFile("ext\\mbstring\\oniguruma\\src\\oniguruma.h",
14+
"ext\\mbstring\\oniguruma\\oniguruma.h", true);
15+
1316
if (PHP_LIBMBFL != "no" &&
1417
CHECK_HEADER_ADD_INCLUDE("mbfl/mbfilter.h", "CFLAGS_LIBMBFL", PHP_LIBMBFL + "\\include") &&
1518
CHECK_LIB("mbfl.lib", "libmbfl", PHP_LIBMBFL + "\\lib")) {
@@ -74,8 +77,13 @@ if (PHP_MBSTRING != "no") {
7477
AC_DEFINE('HAVE_MBSTR_RU', 1, 'RU');
7578
AC_DEFINE('HAVE_MBSTR_TW', 1, 'TW');
7679

77-
FSO.CopyFile("ext\\mbstring\\oniguruma\\win32\\config.h",
78-
"ext\\mbstring\\oniguruma\\config.h", true);
80+
if (X64) {
81+
FSO.CopyFile("ext\\mbstring\\oniguruma\\src\\config.h.win64",
82+
"ext\\mbstring\\oniguruma\\src\\config.h", true);
83+
} else {
84+
FSO.CopyFile("ext\\mbstring\\oniguruma\\src\\config.h.win32",
85+
"ext\\mbstring\\oniguruma\\src\\config.h", true);
86+
}
7987

8088
if (PHP_MBREGEX != "no") {
8189
AC_DEFINE('HAVE_STDARG_PROTOTYPES', 1, 'have stdarg.h');
@@ -84,16 +92,7 @@ if (PHP_MBSTRING != "no") {
8492
if (PHP_MBREGEX_BACKTRACK != "no") {
8593
AC_DEFINE('USE_COMBINATION_EXPLOSION_CHECK', 1);
8694
}
87-
ADD_SOURCES("ext/mbstring/oniguruma", "regcomp.c regerror.c \
88-
regenc.c regexec.c reggnu.c regparse.c regposerr.c \
89-
regext.c regsyntax.c regtrav.c regversion.c st.c", "mbstring");
90-
ADD_SOURCES("ext/mbstring/oniguruma/enc", "ascii.c big5.c \
91-
euc_jp.c euc_kr.c euc_tw.c iso8859_1.c iso8859_2.c \
92-
iso8859_3.c iso8859_4.c iso8859_5.c iso8859_6.c \
93-
iso8859_7.c iso8859_8.c iso8859_9.c iso8859_10.c \
94-
iso8859_11.c iso8859_13.c iso8859_14.c iso8859_15.c iso8859_16.c \
95-
koi8.c koi8_r.c sjis.c utf8.c unicode.c utf16_be.c utf16_le.c \
96-
utf32_be.c utf32_le.c gb18030.c", "mbstring");
95+
ADD_SOURCES("ext/mbstring/oniguruma/src", "ascii.c big5.c cp1251.c euc_jp.c euc_jp_prop.c euc_kr.c euc_tw.c gb18030.c iso8859_1.c iso8859_10.c iso8859_11.c iso8859_13.c iso8859_14.c iso8859_15.c iso8859_16.c iso8859_2.c iso8859_3.c iso8859_4.c iso8859_5.c iso8859_6.c iso8859_7.c iso8859_8.c iso8859_9.c koi8.c koi8_r.c mktable.c onig_init.c regcomp.c regenc.c regerror.c regexec.c regext.c reggnu.c regparse.c regposerr.c regposix.c regsyntax.c regtrav.c regversion.c sjis.c sjis_prop.c st.c unicode.c unicode_fold1_key.c unicode_fold2_key.c unicode_fold3_key.c unicode_unfold_key.c utf16_be.c utf16_le.c utf32_be.c utf32_le.c utf8.c", "mbstring");
9796
ADD_SOURCES("ext/mbstring", "php_mbregex.c", "mbstring");
9897
PHP_INSTALL_HEADERS("ext/mbstring", "php_mbregex.h");
9998
}

ext/mbstring/oniguruma/AUTHORS

+1-1
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
sndgk393 AT ybb DOT ne DOT jp (K.Kosako)
1+
<[email protected]> (K.Kosako)

ext/mbstring/oniguruma/COPYING

+1-1
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ Oniguruma LICENSE
22
-----------------
33

44
/*-
5-
* Copyright (c) 2002-2007 K.Kosako <sndgk393 AT ybb DOT ne DOT jp>
5+
* Copyright (c) 2002-2015 K.Kosako <[email protected]>
66
* All rights reserved.
77
*
88
* Redistribution and use in source and binary forms, with or without

ext/mbstring/oniguruma/ChangeLog

Whitespace-only changes.

ext/mbstring/oniguruma/HISTORY

+64-6
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,63 @@
11
History
22

3+
2016/11/07: Version 6.1.2
4+
5+
2016/10/25: allow word bound, word begin and word end in look-behind.
6+
2016/10/19: add ONIG_OPTION_CHECK_VALIDITY_OF_STRING option.
7+
2016/10/16: fix use after free node.
8+
2016/10/10: fix memory leaks after parsing regexp error.
9+
2016/09/22: implement many of is_valid_mbc_string().
10+
11+
2016/09/02: Version 6.1.1
12+
13+
2016/08/31: fix segfault /W.?{888}{888}{888}\x00/ (found by libfuzzer)
14+
2016/08/31: fix error unmatched close parenthesis for %{(.*?)} #23
15+
16+
2016/08/29: Version 6.1.0
17+
18+
2016/08/28: add contributed/libfuzzer-onig.cpp (thanks hannob)
19+
2016/08/28: update LTVERSION 4:0:0
20+
2016/08/28: NEW API: onigenc_is_valid_mbc_string().
21+
2016/08/27: add is_valid_mbc_string() member into OnigEncodingType.
22+
2016/08/27: fix out of bounds read.
23+
2016/08/26: fix out of bounds read.
24+
2016/08/25: disable USE_INVALID_CODE_SCHEME.
25+
2016/08/24: fix out of bounds read.
26+
2016/08/23: doc/RE improved.
27+
2016/08/22: add onig_scan() into doc/API.
28+
2016/08/22: fix bug: Out of bounds read in onig_strcpy() #17
29+
2016/08/21: fix bug: infinite loop of backreference and group.
30+
2016/08/21: fix out of bounds read in mbc_to_code() #16
31+
2016/08/18: doc/RE refinements.
32+
2016/08/16: add onig_scan() (NEW API)
33+
2016/08/16: reimplement match stack allocation for case too many repeat
34+
and too many captures in regexp.
35+
2016/08/15: number of captures <= 32767 for bytecode representation.
36+
2016/07/17: don't use int_map_backward for thread-safe.
37+
2016/07/04: fix case of enclosed option in look-behind.
38+
2016/07/04: fix ignore case in look-behind.
39+
2016/05/23: fix memory leak in onig_unicode_define_user_property()
40+
2016/05/20: declare variables at the top of scope. (thanks nmaya)
41+
42+
2016/05/09: Version 6.0.0
43+
44+
2016/05/05: add NEW API: onig_unicode_define_user_property()
45+
2016/05/04: update Unicode data to 8.0.0
46+
2016/05/02: change OnigCodePoint type to unsigned int.
47+
2016/05/02: add doc/UNICODE_PROPERTIES.
48+
2016/04/19: add error code ONIGERR_FAIL_TO_INITIALIZE.
49+
2016/04/18: add make_win64/32.bat.
50+
2016/04/18: fix bug of uninitialized regex_t value on error.
51+
2016/04/16: reimplement Unicode case folding.
52+
2016/04/11: update LTVERSION = 3.0.0
53+
2016/04/05: remove all THREAD_ macro.
54+
2016/04/05: add init member into OnigEncoding. (add onig_initialize())
55+
2016/03/28: remove state member of regex.
56+
2016/03/25: move source files into src/
57+
2016/03/23: rename configre.in to configure.ac.
58+
2015/11/17: fix memory leak. (thanks pigzang)
59+
2015/07/13: change mail address.
60+
361
2014/12/12: Version 5.9.6
462

563
2013/11/27: [impl] add onigenc_end_unicode(). (thanks Takenori Imoto)
@@ -288,7 +346,7 @@ History
288346
2006/10/10: [impl] remove OP_WORD_SB and OP_WORD_MB.
289347
2006/10/10: [impl] remove OP_EXACT1_IC and OP_EXACTN_IC from match_at().
290348
2006/10/10: [impl] should free new_str in expand_case_fold_string().
291-
2006/10/06: [dist] add test entrys to sample/encode.c.
349+
2006/10/06: [dist] add test entries to sample/encode.c.
292350
2006/10/06: [impl] re-implement caseless match (case-fold).
293351
2006/10/06: [impl] expand string node by case fold variations.
294352
add expand_case_fold_string().
@@ -857,7 +915,7 @@ History
857915
2004/11/16: [impl] add get_type_cc_node method to OnigEncodingType.
858916
2004/11/15: [impl] add st.h and st.c from Ruby 1.9.
859917
use st-hash always.
860-
2004/11/12: [impl] change menber 'not' of CClassNode to 'flags'.
918+
2004/11/12: [impl] change member 'not' of CClassNode to 'flags'.
861919
add flags FLAG_CCLASS_NOT and FLAG_CCLASS_SHARE.
862920
2004/11/12: [impl] add onig_is_in_code_range_array() to enc/unicode.c.
863921
2004/11/12: [impl] fix CRWord in enc/unicode.c and MBWord in enc/utf8.c.
@@ -902,7 +960,7 @@ History
902960
2004/10/18: [impl] (thanks Imai Yasumasa)
903961
enclose #include <sys/types.h> by #ifndef __BORLANDC__.
904962
2004/10/18: [bug] (thanks Imai Yasumasa)
905-
memory acess violation in select_opt_exact_info().
963+
memory access violation in select_opt_exact_info().
906964
2004/09/25: [dist] fix doc/API and doc/API.ja.
907965
2004/09/25: [bug] fix OP_SEMI_END_BUF process in match_at() for
908966
the case USE_NEWLINE_AT_END_OF_STRING_HAS_EMPTY_LINE
@@ -1113,7 +1171,7 @@ History
11131171
2004/04/15: [new] add onig_get_ambig_flag().
11141172
2004/04/14: [bug] (thanks Isao Sonobe)
11151173
undefined bytecode error happens if ONIG_OPTION_FIND_LONGEST
1116-
is setted.
1174+
is set.
11171175
should finish matching process if find-condition
11181176
is fail at OP_END in match_at().
11191177
2004/04/12: [impl] add ambig_flag to regex_t.
@@ -1671,7 +1729,7 @@ History
16711729
2003/03/12: [spec] change named backref and subexp call format.
16721730
backref: \k<name>, call: \g<name> (thanks akr)
16731731
2003/03/11: [inst] add regparse.[ch] in win32/Makefile.
1674-
2003/03/11: [bug] if UNALIGNED_WORD_ACCESS isn't setted
1732+
2003/03/11: [bug] if UNALIGNED_WORD_ACCESS isn't set,
16751733
then compile error in unset_addr_list_fix(). (thanks knu)
16761734
2003/03/10: [impl] divide regcomp.c to regcomp.c, regparse.c and regparse.h.
16771735
2003/03/10: [bug] should handle multi-byte code name in fetch_name().
@@ -1738,7 +1796,7 @@ History
17381796
2003/02/28: [impl] add opcode OP_CALL, OP_RETURN.
17391797
add stack type STK_CALL_FRAME, STK_RETURN, STK_MEM_END.
17401798
2003/02/26: [spec] add new syntax behavior REG_SYN_STRICT_CHECK_BACKREF_NUMBER.
1741-
if it is setted, then error /(\1)/, /\1(..)/ etc...
1799+
if it is set, then error /(\1)/, /\1(..)/ etc...
17421800
2003/02/26: [spec] if backref number is greater than max group number,
17431801
then return compile error. (REGERR_INVALID_BACKREF_NUMBER)
17441802
2003/02/26: [tune] bad implemented N_ALT case in get_min_match_length().

0 commit comments

Comments
 (0)