masugata Fri Aug 25 16:26:50 2006 UTC Modified files: (Branch: PHP_5_2) /php-src/ext/mbstring config.m4 mbstring.c /php-src/ext/mbstring/oniguruma regcomp.c regint.h Log: added configure option --disable-mbregex-backtrack. http://cvs.php.net/viewvc.cgi/php-src/ext/mbstring/config.m4?r1=1.58.2.4.2.2&r2=1.58.2.4.2.3&diff_format=u Index: php-src/ext/mbstring/config.m4 diff -u php-src/ext/mbstring/config.m4:1.58.2.4.2.2 php-src/ext/mbstring/config.m4:1.58.2.4.2.3 --- php-src/ext/mbstring/config.m4:1.58.2.4.2.2 Thu Jul 20 15:45:06 2006 +++ php-src/ext/mbstring/config.m4 Fri Aug 25 16:26:50 2006 @@ -1,5 +1,5 @@ dnl -dnl $Id: config.m4,v 1.58.2.4.2.2 2006/07/20 15:45:06 masugata Exp $ +dnl $Id: config.m4,v 1.58.2.4.2.3 2006/08/25 16:26:50 masugata Exp $ dnl AC_DEFUN([PHP_MBSTRING_ADD_SOURCES], [ @@ -101,6 +101,11 @@ fi AC_DEFINE([HAVE_MBREGEX], 1, [whether to have multibyte regex support]) + + if test "$PHP_MBREGEX_BACKTRACK" != "no"; then + AC_DEFINE([HAVE_MBREGEX_BACKTRACK],1,[whether to check multibyte regex backtrack]) + fi + PHP_MBSTRING_ADD_CFLAG([-DNOT_RUBY]) PHP_MBSTRING_ADD_BUILD_DIR([oniguruma]) PHP_MBSTRING_ADD_BUILD_DIR([oniguruma/enc]) @@ -278,6 +283,9 @@ PHP_ARG_ENABLE([mbregex], [whether to enable multibyte regex support], [ --disable-mbregex MBSTRING: Disable multibyte regex support], yes, no) +PHP_ARG_ENABLE([mbregex_backtrack], [whether to check multibyte regex backtrack], +[ --disable-mbregex-backtrack MBSTRING: Disable multibyte regex backtrack check], yes, no) + PHP_ARG_WITH(libmbfl, [for external libmbfl], [ --with-libmbfl[=DIR] MBSTRING: Use external libmbfl. DIR is the libmbfl install prefix. If DIR is not set, the bundled libmbfl will be used], no, no) http://cvs.php.net/viewvc.cgi/php-src/ext/mbstring/mbstring.c?r1=1.224.2.22.2.10&r2=1.224.2.22.2.11&diff_format=u Index: php-src/ext/mbstring/mbstring.c diff -u php-src/ext/mbstring/mbstring.c:1.224.2.22.2.10 php-src/ext/mbstring/mbstring.c:1.224.2.22.2.11 --- php-src/ext/mbstring/mbstring.c:1.224.2.22.2.10 Thu Aug 24 16:52:36 2006 +++ php-src/ext/mbstring/mbstring.c Fri Aug 25 16:26:50 2006 @@ -17,7 +17,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: mbstring.c,v 1.224.2.22.2.10 2006/08/24 16:52:36 masugata Exp $ */ +/* $Id: mbstring.c,v 1.224.2.22.2.11 2006/08/25 16:26:50 masugata Exp $ */ /* * PHP 4 Multibyte String module "mbstring" @@ -1050,6 +1050,11 @@ sprintf(buf, "%d.%d.%d", ONIGURUMA_VERSION_MAJOR,ONIGURUMA_VERSION_MINOR,ONIGURUMA_VERSION_TEENY); php_info_print_table_row(2, "Multibyte regex (oniguruma) version", buf); +#ifdef HAVE_MBREGEX_BACKTRACK + php_info_print_table_row(2, "Multibyte regex (oniguruma) backtrack check", "On"); +#else /* HAVE_MBREGEX_BACKTRACK */ + php_info_print_table_row(2, "Multibyte regex (oniguruma) backtrack check", "Off"); +#endif /* HAVE_MBREGEX_BACKTRACK */ } #endif php_info_print_table_end(); http://cvs.php.net/viewvc.cgi/php-src/ext/mbstring/oniguruma/regcomp.c?r1=1.5.4.2&r2=1.5.4.3&diff_format=u Index: php-src/ext/mbstring/oniguruma/regcomp.c diff -u php-src/ext/mbstring/oniguruma/regcomp.c:1.5.4.2 php-src/ext/mbstring/oniguruma/regcomp.c:1.5.4.3 --- php-src/ext/mbstring/oniguruma/regcomp.c:1.5.4.2 Thu Aug 24 17:03:47 2006 +++ php-src/ext/mbstring/oniguruma/regcomp.c Fri Aug 25 16:26:50 2006 @@ -186,6 +186,8 @@ return 0; } +#ifdef USE_COMBINATION_EXPLOSION_CHECK + static int add_state_check_num(regex_t* reg, int num) { @@ -194,6 +196,7 @@ BBUF_ADD(reg, &n, SIZE_STATE_CHECK_NUM); return 0; } +#endif /* USE_COMBINATION_EXPLOSION_CHECK */ static int add_rel_addr(regex_t* reg, int addr) http://cvs.php.net/viewvc.cgi/php-src/ext/mbstring/oniguruma/regint.h?r1=1.5.4.2&r2=1.5.4.3&diff_format=u Index: php-src/ext/mbstring/oniguruma/regint.h diff -u php-src/ext/mbstring/oniguruma/regint.h:1.5.4.2 php-src/ext/mbstring/oniguruma/regint.h:1.5.4.3 --- php-src/ext/mbstring/oniguruma/regint.h:1.5.4.2 Thu Aug 24 17:03:47 2006 +++ php-src/ext/mbstring/oniguruma/regint.h Fri Aug 25 16:26:50 2006 @@ -59,7 +59,9 @@ /* #define USE_UNICODE_FULL_RANGE_CTYPE */ /* --> move to regenc.h */ #define USE_NAMED_GROUP #define USE_SUBEXP_CALL +#ifdef HAVE_MBREGEX_BACKTRACK #define USE_COMBINATION_EXPLOSION_CHECK /* (X*)* */ +#endif /* HAVE_MBREGEX_BACKTRACK */ #define USE_INFINITE_REPEAT_MONOMANIAC_MEM_STATUS_CHECK /* /(?:()|())*\2/ */ #define USE_NEWLINE_AT_END_OF_STRING_HAS_EMPTY_LINE /* /\n$/ =~ "\n" */ #define USE_WARNING_REDUNDANT_NESTED_REPEAT_OPERATOR
-- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php