mirror of
https://github.com/php/php-src.git
synced 2025-01-20 18:53:37 +08:00
added configure option --disable-mbregex-backtrack.
This commit is contained in:
parent
8e54de1d77
commit
100742f7a2
@ -101,6 +101,11 @@ esac
|
||||
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(mbstring, whether to enable multibyte string support,
|
||||
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)
|
||||
|
@ -1050,6 +1050,11 @@ PHP_MINFO_FUNCTION(mbstring)
|
||||
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();
|
||||
|
@ -186,6 +186,8 @@ add_opcode(regex_t* reg, int opcode)
|
||||
return 0;
|
||||
}
|
||||
|
||||
#ifdef USE_COMBINATION_EXPLOSION_CHECK
|
||||
|
||||
static int
|
||||
add_state_check_num(regex_t* reg, int num)
|
||||
{
|
||||
@ -194,6 +196,7 @@ add_state_check_num(regex_t* reg, int num)
|
||||
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)
|
||||
|
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user