diff options
author | Mark A. Hershberger <mah@debian.(none)> | 2009-03-25 00:38:07 -0400 |
---|---|---|
committer | Mark A. Hershberger <mah@debian.(none)> | 2009-03-25 00:38:07 -0400 |
commit | bb01389fbd53ec1cbcb80d0681a37cca1267891a (patch) | |
tree | 4783178fca65a5d9071c8df34f2ddc3d31728673 /ext/mbstring | |
parent | eddbbea4325e602ddc87c545531609132d4f0e3b (diff) | |
download | php-bb01389fbd53ec1cbcb80d0681a37cca1267891a.tar.gz |
Imported Upstream version 5.2.4upstream/5.2.4
Diffstat (limited to 'ext/mbstring')
-rw-r--r-- | ext/mbstring/config.m4 | 11 | ||||
-rw-r--r-- | ext/mbstring/libmbfl/mbfl/mbfilter.c | 10 | ||||
-rw-r--r-- | ext/mbstring/mbstring.c | 15 |
3 files changed, 16 insertions, 20 deletions
diff --git a/ext/mbstring/config.m4 b/ext/mbstring/config.m4 index 4f493a7de..ea60efa6f 100644 --- a/ext/mbstring/config.m4 +++ b/ext/mbstring/config.m4 @@ -1,5 +1,5 @@ dnl -dnl $Id: config.m4,v 1.58.2.4.2.8 2007/01/29 22:53:47 hirokawa Exp $ +dnl $Id: config.m4,v 1.58.2.4.2.10 2007/07/31 12:23:50 tony2001 Exp $ dnl AC_DEFUN([PHP_MBSTRING_ADD_SOURCES], [ @@ -270,7 +270,7 @@ AC_DEFUN([PHP_MBSTRING_SETUP_LIBMBFL], [ ],[ AC_MSG_ERROR([Problem with libmbfl. Please check config.log for more information.]) ], [ - -LPHP_LIBMBFL/$PHP_LIBDIR + -L$PHP_LIBMBFL/$PHP_LIBDIR ]) fi ]) @@ -286,11 +286,12 @@ 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) +[ --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) +[ --with-libmbfl[=DIR] MBSTRING: Use external libmbfl. DIR is the libmbfl base + install directory [BUNDLED]], no, no) if test "$PHP_MBSTRING" != "no"; then AC_DEFINE([HAVE_MBSTRING],1,[whether to have multibyte string support]) diff --git a/ext/mbstring/libmbfl/mbfl/mbfilter.c b/ext/mbstring/libmbfl/mbfl/mbfilter.c index a8e3b68d3..97d2f048c 100644 --- a/ext/mbstring/libmbfl/mbfl/mbfilter.c +++ b/ext/mbstring/libmbfl/mbfl/mbfilter.c @@ -858,7 +858,7 @@ mbfl_strpos( int offset, int reverse) { - int n, result; + int n, result, negative_offset = 0; unsigned char *p; mbfl_convert_filter *filter; struct collector_strpos_data pc; @@ -904,6 +904,12 @@ mbfl_strpos( mbfl_wchar_device_clear(&pc.needle); return -4; } + + if (offset < 0) { + negative_offset = -offset-1; + offset = 0; + } + pc.start = offset; pc.output = 0; pc.needle_pos = 0; @@ -912,7 +918,7 @@ mbfl_strpos( /* feed data */ p = haystack->val; - n = haystack->len; + n = haystack->len - negative_offset; if (p != NULL) { while (n > 0) { if ((*filter->filter_function)(*p++, filter) < 0) { diff --git a/ext/mbstring/mbstring.c b/ext/mbstring/mbstring.c index 2cf47de61..56f2c2f42 100644 --- a/ext/mbstring/mbstring.c +++ b/ext/mbstring/mbstring.c @@ -17,7 +17,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: mbstring.c,v 1.224.2.22.2.22 2007/04/04 15:25:41 masugata Exp $ */ +/* $Id: mbstring.c,v 1.224.2.22.2.24 2007/07/12 15:31:54 masugata Exp $ */ /* * PHP 4 Multibyte String module "mbstring" @@ -3297,7 +3297,6 @@ PHP_FUNCTION(mb_decode_numericentity) /* {{{ proto int mb_send_mail(string to, string subject, string message [, string additional_headers [, string additional_parameters]]) * Sends an email message with MIME scheme */ -#if HAVE_SENDMAIL #define SKIP_LONG_HEADER_SEP_MBSTRING(str, pos) \ if (str[pos] == '\r' && str[pos + 1] == '\n' && (str[pos + 2] == ' ' || str[pos + 2] == '\t')) { \ @@ -3771,7 +3770,7 @@ PHP_FUNCTION(mb_send_mail) headers = (char *)device.buffer; if (force_extra_parameters) { - extra_cmd = estrdup(force_extra_parameters); + extra_cmd = php_escape_shell_cmd(force_extra_parameters); } else if (extra_cmd) { extra_cmd = php_escape_shell_cmd(extra_cmd); } @@ -3806,16 +3805,6 @@ PHP_FUNCTION(mb_send_mail) #undef PHP_MBSTR_MAIL_MIME_HEADER2 #undef PHP_MBSTR_MAIL_MIME_HEADER3 #undef PHP_MBSTR_MAIL_MIME_HEADER4 - -#else /* HAVE_SENDMAIL */ - -PHP_FUNCTION(mb_send_mail) -{ - RETURN_FALSE; -} - -#endif /* HAVE_SENDMAIL */ - /* }}} */ /* {{{ proto mixed mb_get_info([string type]) |