[PHP-CVS-DAILY] cvs: php-src / ChangeLog
changelog Sat Jun 16 01:31:19 2007 UTC Modified files: /php-srcChangeLog Log: ChangeLog update http://cvs.php.net/viewvc.cgi/php-src/ChangeLog?r1=1.2720r2=1.2721diff_format=u Index: php-src/ChangeLog diff -u php-src/ChangeLog:1.2720 php-src/ChangeLog:1.2721 --- php-src/ChangeLog:1.2720Fri Jun 15 01:31:14 2007 +++ php-src/ChangeLog Sat Jun 16 01:31:18 2007 @@ -1,3 +1,149 @@ +2007-06-15 Stanislav Malyshev [EMAIL PROTECTED] + +* ext/session/session.c + ext/session/session.c: + MF5: Disallow characters that Cookie RFC does not allow in unquoted cookies + +* (PHP_5_2) + ext/session/session.c: + Disallow characters that Cookie RFC does not allow in unquoted cookies + +2007-06-15 Nuno Lopes [EMAIL PROTECTED] + +* ext/gd/libgd/gd.c: + MFB: sync with libgd: improve _gdImageFillTiled() + +* (PHP_5_2) + ext/gd/libgd/gd.c: + sync with libgd: improve _gdImageFillTiled() + +* (PHP_5_2) + NEWS + ext/pcre/config.w32 + ext/pcre/config0.m4 + ext/pcre/upgrade-pcre.php + ext/pcre/pcrelib/AUTHORS + ext/pcre/pcrelib/COPYING + ext/pcre/pcrelib/ChangeLog + ext/pcre/pcrelib/HACKING + ext/pcre/pcrelib/LICENCE + ext/pcre/pcrelib/NEWS + ext/pcre/pcrelib/NON-UNIX-USE + ext/pcre/pcrelib/README + ext/pcre/pcrelib/config.h + ext/pcre/pcrelib/dftables.c + ext/pcre/pcrelib/libpcre.def + ext/pcre/pcrelib/libpcreposix.def + ext/pcre/pcrelib/pcre.def + ext/pcre/pcrelib/pcre.h + ext/pcre/pcrelib/pcre_chartables.c + ext/pcre/pcrelib/pcre_compile.c + ext/pcre/pcrelib/pcre_config.c + ext/pcre/pcrelib/pcre_exec.c + ext/pcre/pcrelib/pcre_fullinfo.c + ext/pcre/pcrelib/pcre_get.c + ext/pcre/pcrelib/pcre_globals.c + ext/pcre/pcrelib/pcre_info.c + ext/pcre/pcrelib/pcre_internal.h + ext/pcre/pcrelib/pcre_maketables.c + ext/pcre/pcrelib/pcre_newline.c + ext/pcre/pcrelib/pcre_ord2utf8.c + ext/pcre/pcrelib/pcre_printint.src + ext/pcre/pcrelib/pcre_refcount.c + ext/pcre/pcrelib/pcre_scanner.cc + ext/pcre/pcrelib/pcre_scanner.h + ext/pcre/pcrelib/pcre_scanner_unittest.cc + ext/pcre/pcrelib/pcre_stringpiece.cc + ext/pcre/pcrelib/pcre_stringpiece.h + ext/pcre/pcrelib/pcre_stringpiece_unittest.cc + ext/pcre/pcrelib/pcre_study.c + ext/pcre/pcrelib/pcre_tables.c + ext/pcre/pcrelib/pcre_try_flipped.c + ext/pcre/pcrelib/pcre_ucp_searchfuncs.c + ext/pcre/pcrelib/pcre_valid_utf8.c + ext/pcre/pcrelib/pcre_version.c + ext/pcre/pcrelib/pcre_xclass.c + ext/pcre/pcrelib/pcrecpp.cc + ext/pcre/pcrelib/pcrecpp.h + ext/pcre/pcrelib/pcrecpp_unittest.cc + ext/pcre/pcrelib/pcrecpparg.h + ext/pcre/pcrelib/pcredemo.c + ext/pcre/pcrelib/pcregrep.c + ext/pcre/pcrelib/pcreposix.c + ext/pcre/pcrelib/pcreposix.h + ext/pcre/pcrelib/pcretest.c + ext/pcre/pcrelib/ucptable.c + ext/pcre/pcrelib/ucptable.h + ext/pcre/pcrelib/doc/Tech.Notes + ext/pcre/pcrelib/doc/pcre.txt + ext/pcre/pcrelib/testdata/.cvsignore + ext/pcre/pcrelib/testdata/grepinputx + ext/pcre/pcrelib/testdata/grepoutput + ext/pcre/pcrelib/testdata/grepoutputN + ext/pcre/pcrelib/testdata/testinput1 + ext/pcre/pcrelib/testdata/testinput10 + ext/pcre/pcrelib/testdata/testinput2 + ext/pcre/pcrelib/testdata/testinput3 + ext/pcre/pcrelib/testdata/testinput5 + ext/pcre/pcrelib/testdata/testinput6 + ext/pcre/pcrelib/testdata/testinput7 + ext/pcre/pcrelib/testdata/testinput8 + ext/pcre/pcrelib/testdata/testinput9 + ext/pcre/pcrelib/testdata/testoutput1 + ext/pcre/pcrelib/testdata/testoutput10 + ext/pcre/pcrelib/testdata/testoutput2 + ext/pcre/pcrelib/testdata/testoutput3 + ext/pcre/pcrelib/testdata/testoutput5 + ext/pcre/pcrelib/testdata/testoutput6 + ext/pcre/pcrelib/testdata/testoutput7 + ext/pcre/pcrelib/testdata/testoutput8 + ext/pcre/pcrelib/testdata/testoutput9: + upgrade PCRE to version 7.2 RC3 + +* ext/pcre/tests/bug41050.phpt + ext/pcre/tests/bug41148.phpt + ext/pcre/tests/bug41638.phpt: + MFB: new tests + +* ext/pcre/tests/bug41050.phpt + ext/pcre/tests/bug41050.phpt + ext/pcre/tests/bug41148.phpt + ext/pcre/tests/bug41148.phpt + ext/pcre/tests/bug41638.phpt + ext/pcre/tests/bug41638.phpt: + + file bug41050.phpt was initially added on branch PHP_5_2. + +2007-06-15 Dmitry Stogov [EMAIL PROTECTED] + +* (PHP_5_2) + NEWS + main/main.c + main/main.c: + HTTP 500 is sent to browser in case of PHP error instead of blank page + +* ext/standard/tests/network/bug41347.phpt + ext/standard/tests/network/bug41347.phpt + ext/standard/tests/strings/unpack.phpt + ext/standard/tests/strings/unpack.phpt: + Fixed test + +*
[PHP-CVS] cvs: php-src(PHP_5_2) /main main.c
dmitry Fri Jun 15 07:27:08 2007 UTC Modified files: (Branch: PHP_5_2) /php-src/main main.c Log: Prevent crash in case of wrong arguments to CRT functions (strftime()) on PHP complead by MS VC2005 http://cvs.php.net/viewvc.cgi/php-src/main/main.c?r1=1.640.2.23.2.36r2=1.640.2.23.2.37diff_format=u Index: php-src/main/main.c diff -u php-src/main/main.c:1.640.2.23.2.36 php-src/main/main.c:1.640.2.23.2.37 --- php-src/main/main.c:1.640.2.23.2.36 Thu Jun 7 08:44:41 2007 +++ php-src/main/main.c Fri Jun 15 07:27:08 2007 @@ -18,7 +18,7 @@ +--+ */ -/* $Id: main.c,v 1.640.2.23.2.36 2007/06/07 08:44:41 tony2001 Exp $ */ +/* $Id: main.c,v 1.640.2.23.2.37 2007/06/15 07:27:08 dmitry Exp $ */ /* {{{ includes */ @@ -1424,6 +1424,36 @@ } /* }}} */ +#if defined(PHP_WIN32) defined(_MSC_VER) (_MSC_VER = 1400) +static _invalid_parameter_handler old_invalid_parameter_handler; + +void dummy_invalid_parameter_handler( + const wchar_t *expression, + const wchar_t *function, + const wchar_t *file, + unsigned int line, + uintptr_t pEwserved) +{ + static int called = 0; + char buf[1024]; + int len; + + if (!called) { + called = 1; + if (function) { + if (file) { + len = _snprintf(buf, sizeof(buf)-1, Invalid parameter detected in CRT function '%ws' (%ws:%d), function, file, line); + } else { + len = _snprintf(buf, sizeof(buf)-1, Invalid parameter detected in CRT function '%ws', function); + } + } else { + len = _snprintf(buf, sizeof(buf)-1, Invalid CRT parameters detected); + } + zend_error(E_WARNING, %s, buf); + called = 0; + } +} +#endif /* {{{ php_module_startup */ @@ -1454,6 +1484,13 @@ php_os=WIN32; } } +#if defined(_MSC_VER) (_MSC_VER = 1400) + old_invalid_parameter_handler = + _set_invalid_parameter_handler(dummy_invalid_parameter_handler); + if (old_invalid_parameter_handler != NULL) { + _set_invalid_parameter_handler(old_invalid_parameter_handler); + } +#endif #else php_os=PHP_OS; #endif @@ -1707,6 +1744,12 @@ php_shutdown_temporary_directory(); module_initialized = 0; + +#if defined(PHP_WIN32) defined(_MSC_VER) (_MSC_VER = 1400) + if (old_invalid_parameter_handler == NULL) { + _set_invalid_parameter_handler(old_invalid_parameter_handler); + } +#endif } /* }}} */ -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-CVS] cvs: php-src /main main.c
dmitry Fri Jun 15 07:28:49 2007 UTC Modified files: /php-src/main main.c Log: Prevent crash in case of wrong arguments to CRT functions (dtrftime()) on PHP complead by MS VC8 http://cvs.php.net/viewvc.cgi/php-src/main/main.c?r1=1.729r2=1.730diff_format=u Index: php-src/main/main.c diff -u php-src/main/main.c:1.729 php-src/main/main.c:1.730 --- php-src/main/main.c:1.729 Thu Jun 7 08:46:32 2007 +++ php-src/main/main.c Fri Jun 15 07:28:49 2007 @@ -18,7 +18,7 @@ +--+ */ -/* $Id: main.c,v 1.729 2007/06/07 08:46:32 tony2001 Exp $ */ +/* $Id: main.c,v 1.730 2007/06/15 07:28:49 dmitry Exp $ */ /* {{{ includes */ @@ -1763,6 +1763,36 @@ /* start additional PHP extensions */ php_register_extensions(additional_modules, num_additional_modules TSRMLS_CC); +#if defined(PHP_WIN32) defined(_MSC_VER) (_MSC_VER = 1400) +static _invalid_parameter_handler old_invalid_parameter_handler; + +void dummy_invalid_parameter_handler( + const wchar_t *expression, + const wchar_t *function, + const wchar_t *file, + unsigned int line, + uintptr_t pEwserved) +{ + static int called = 0; + char buf[1024]; + int len; + + if (!called) { + called = 1; + if (function) { + if (file) { + len = _snprintf(buf, sizeof(buf)-1, Invalid parameter detected in CRT function '%ws' (%ws:%d), function, file, line); + } else { + len = _snprintf(buf, sizeof(buf)-1, Invalid parameter detected in CRT function '%ws', function); + } + } else { + len = _snprintf(buf, sizeof(buf)-1, Invalid CRT parameters detected); + } + zend_error(E_WARNING, %s, buf); + called = 0; + } +} +#endif /* load and startup extensions compiled as shared objects (aka DLLs) as requested by php.ini entries @@ -1872,6 +1902,12 @@ #else ts_free_id(core_globals_id); #endif + +#if defined(PHP_WIN32) defined(_MSC_VER) (_MSC_VER = 1400) + if (old_invalid_parameter_handler == NULL) { + _set_invalid_parameter_handler(old_invalid_parameter_handler); + } +#endif } /* }}} */ @@ -1967,6 +2003,13 @@ fchdir(old_cwd_fd); close(old_cwd_fd); } +#if defined(_MSC_VER) (_MSC_VER = 1400) + old_invalid_parameter_handler = + _set_invalid_parameter_handler(dummy_invalid_parameter_handler); + if (old_invalid_parameter_handler != NULL) { + _set_invalid_parameter_handler(old_invalid_parameter_handler); + } +#endif #else if (old_cwd[0] != '\0') { VCWD_CHDIR(old_cwd); -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-CVS] cvs: php-src /main main.c
dmitry Fri Jun 15 07:32:17 2007 UTC Modified files: /php-src/main main.c Log: (wrong previous patch) http://cvs.php.net/viewvc.cgi/php-src/main/main.c?r1=1.730r2=1.731diff_format=u Index: php-src/main/main.c diff -u php-src/main/main.c:1.730 php-src/main/main.c:1.731 --- php-src/main/main.c:1.730 Fri Jun 15 07:28:49 2007 +++ php-src/main/main.c Fri Jun 15 07:32:17 2007 @@ -18,7 +18,7 @@ +--+ */ -/* $Id: main.c,v 1.730 2007/06/15 07:28:49 dmitry Exp $ */ +/* $Id: main.c,v 1.731 2007/06/15 07:32:17 dmitry Exp $ */ /* {{{ includes */ @@ -1547,6 +1547,37 @@ } /* }}} */ +#if defined(PHP_WIN32) defined(_MSC_VER) (_MSC_VER = 1400) +static _invalid_parameter_handler old_invalid_parameter_handler; + +void dummy_invalid_parameter_handler( + const wchar_t *expression, + const wchar_t *function, + const wchar_t *file, + unsigned int line, + uintptr_t pEwserved) +{ + static int called = 0; + char buf[1024]; + int len; + + if (!called) { + called = 1; + if (function) { + if (file) { + len = _snprintf(buf, sizeof(buf)-1, Invalid parameter detected in CRT function '%ws' (%ws:%d), function, file, line); + } else { + len = _snprintf(buf, sizeof(buf)-1, Invalid parameter detected in CRT function '%ws', function); + } + } else { + len = _snprintf(buf, sizeof(buf)-1, Invalid CRT parameters detected); + } + zend_error(E_WARNING, %s, buf); + called = 0; + } +} +#endif + /* {{{ php_module_startup */ int php_module_startup(sapi_module_struct *sf, zend_module_entry *additional_modules, uint num_additional_modules) @@ -1576,6 +1607,13 @@ php_os=WIN32; } } +#if defined(_MSC_VER) (_MSC_VER = 1400) + old_invalid_parameter_handler = + _set_invalid_parameter_handler(dummy_invalid_parameter_handler); + if (old_invalid_parameter_handler != NULL) { + _set_invalid_parameter_handler(old_invalid_parameter_handler); + } +#endif #else php_os=PHP_OS; #endif @@ -1763,37 +1801,6 @@ /* start additional PHP extensions */ php_register_extensions(additional_modules, num_additional_modules TSRMLS_CC); -#if defined(PHP_WIN32) defined(_MSC_VER) (_MSC_VER = 1400) -static _invalid_parameter_handler old_invalid_parameter_handler; - -void dummy_invalid_parameter_handler( - const wchar_t *expression, - const wchar_t *function, - const wchar_t *file, - unsigned int line, - uintptr_t pEwserved) -{ - static int called = 0; - char buf[1024]; - int len; - - if (!called) { - called = 1; - if (function) { - if (file) { - len = _snprintf(buf, sizeof(buf)-1, Invalid parameter detected in CRT function '%ws' (%ws:%d), function, file, line); - } else { - len = _snprintf(buf, sizeof(buf)-1, Invalid parameter detected in CRT function '%ws', function); - } - } else { - len = _snprintf(buf, sizeof(buf)-1, Invalid CRT parameters detected); - } - zend_error(E_WARNING, %s, buf); - called = 0; - } -} -#endif - /* load and startup extensions compiled as shared objects (aka DLLs) as requested by php.ini entries theese are loaded after initialization of internal extensions @@ -2003,13 +2010,6 @@ fchdir(old_cwd_fd); close(old_cwd_fd); } -#if defined(_MSC_VER) (_MSC_VER = 1400) - old_invalid_parameter_handler = - _set_invalid_parameter_handler(dummy_invalid_parameter_handler); - if (old_invalid_parameter_handler != NULL) { - _set_invalid_parameter_handler(old_invalid_parameter_handler); - } -#endif #else if (old_cwd[0] != '\0') { VCWD_CHDIR(old_cwd); -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-CVS] cvs: php-src(PHP_5_2) /ext/standard/tests/file disk_free_space_basic.phpt
dmitry Fri Jun 15 08:04:59 2007 UTC Modified files: (Branch: PHP_5_2) /php-src/ext/standard/tests/filedisk_free_space_basic.phpt Log: Prevent memory overflow http://cvs.php.net/viewvc.cgi/php-src/ext/standard/tests/file/disk_free_space_basic.phpt?r1=1.1.2.2r2=1.1.2.3diff_format=u Index: php-src/ext/standard/tests/file/disk_free_space_basic.phpt diff -u php-src/ext/standard/tests/file/disk_free_space_basic.phpt:1.1.2.2 php-src/ext/standard/tests/file/disk_free_space_basic.phpt:1.1.2.3 --- php-src/ext/standard/tests/file/disk_free_space_basic.phpt:1.1.2.2 Wed Jun 6 12:53:58 2007 +++ php-src/ext/standard/tests/file/disk_free_space_basic.phpt Fri Jun 15 08:04:59 2007 @@ -1,5 +1,7 @@ --TEST-- Test disk_free_space and its alias diskfreespace() functions : basic functionality +--INI-- +memory_limit=32M --FILE-- ?php /* -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-CVS] cvs: php-src /ext/standard/tests/file disk_free_space_basic.phpt
dmitry Fri Jun 15 08:05:15 2007 UTC Modified files: /php-src/ext/standard/tests/filedisk_free_space_basic.phpt Log: Prevent memory overflow http://cvs.php.net/viewvc.cgi/php-src/ext/standard/tests/file/disk_free_space_basic.phpt?r1=1.1r2=1.2diff_format=u Index: php-src/ext/standard/tests/file/disk_free_space_basic.phpt diff -u php-src/ext/standard/tests/file/disk_free_space_basic.phpt:1.1 php-src/ext/standard/tests/file/disk_free_space_basic.phpt:1.2 --- php-src/ext/standard/tests/file/disk_free_space_basic.phpt:1.1 Wed Jun 6 12:50:06 2007 +++ php-src/ext/standard/tests/file/disk_free_space_basic.phpt Fri Jun 15 08:05:15 2007 @@ -1,5 +1,7 @@ --TEST-- Test disk_free_space and its alias diskfreespace() functions : basic functionality +--INI-- +memory_limit=32M --FILE-- ?php /* -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-CVS] cvs: php-src(PHP_5_2) /ext/standard/tests/network bug41347.phpt
dmitry Fri Jun 15 08:13:42 2007 UTC Modified files: (Branch: PHP_5_2) /php-src/ext/standard/tests/network bug41347.phpt Log: Fixed test http://cvs.php.net/viewvc.cgi/php-src/ext/standard/tests/network/bug41347.phpt?r1=1.1.2.1r2=1.1.2.2diff_format=u Index: php-src/ext/standard/tests/network/bug41347.phpt diff -u php-src/ext/standard/tests/network/bug41347.phpt:1.1.2.1 php-src/ext/standard/tests/network/bug41347.phpt:1.1.2.2 --- php-src/ext/standard/tests/network/bug41347.phpt:1.1.2.1Thu May 10 13:16:54 2007 +++ php-src/ext/standard/tests/network/bug41347.phptFri Jun 15 08:13:42 2007 @@ -3,7 +3,7 @@ --SKIPIF-- ?php if (substr(PHP_OS, 0, 3) == 'WIN') { -die('No windows support'); +die('skip No windows support'); } ? --FILE-- -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-CVS] cvs: php-src /ext/standard/tests/network bug41347.phpt
dmitry Fri Jun 15 08:13:57 2007 UTC Modified files: /php-src/ext/standard/tests/network bug41347.phpt Log: Fixed test http://cvs.php.net/viewvc.cgi/php-src/ext/standard/tests/network/bug41347.phpt?r1=1.2r2=1.3diff_format=u Index: php-src/ext/standard/tests/network/bug41347.phpt diff -u php-src/ext/standard/tests/network/bug41347.phpt:1.2 php-src/ext/standard/tests/network/bug41347.phpt:1.3 --- php-src/ext/standard/tests/network/bug41347.phpt:1.2Mon May 14 14:38:29 2007 +++ php-src/ext/standard/tests/network/bug41347.phptFri Jun 15 08:13:57 2007 @@ -3,7 +3,7 @@ --SKIPIF-- ?php if (substr(PHP_OS, 0, 3) == 'WIN') { -die('No windows support'); +die('skip No windows support'); } ? --FILE-- -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-CVS] cvs: php-src /ext/pcre/tests bug41050.phpt bug41148.phpt bug41638.phpt
nlopess Fri Jun 15 12:04:26 2007 UTC Modified files: /php-src/ext/pcre/tests bug41050.phpt bug41148.phpt bug41638.phpt Log: MFB: new tests #they pass here, but segfault on php 5.2/pcre 7.0 http://cvs.php.net/viewvc.cgi/php-src/ext/pcre/tests/bug41050.phpt?r1=1.1r2=1.2diff_format=u Index: php-src/ext/pcre/tests/bug41050.phpt diff -u /dev/null php-src/ext/pcre/tests/bug41050.phpt:1.2 --- /dev/null Fri Jun 15 12:04:26 2007 +++ php-src/ext/pcre/tests/bug41050.phptFri Jun 15 12:04:26 2007 @@ -0,0 +1,26 @@ +--TEST-- +Bug #41050 (pcre 7.0 regression) +--FILE-- +?php +// by legolas558 + +$regex = '/(insert|drop|create|select|delete|update)([^;\']*('.('[^']*')+.')?)*(;|$)/i'; + +$sql = 'SELECT * FROM #__components'; + +if (preg_match($regex,$sql, $m)) echo 'matched'; +else echo 'not matched'; + +print_r($m); + +? +--EXPECT-- +matchedArray +( +[0] = SELECT * FROM #__components +[1] = SELECT +[2] = +[3] = +[4] = +[5] = +) http://cvs.php.net/viewvc.cgi/php-src/ext/pcre/tests/bug41148.phpt?r1=1.1r2=1.2diff_format=u Index: php-src/ext/pcre/tests/bug41148.phpt diff -u /dev/null php-src/ext/pcre/tests/bug41148.phpt:1.2 --- /dev/null Fri Jun 15 12:04:26 2007 +++ php-src/ext/pcre/tests/bug41148.phptFri Jun 15 12:04:26 2007 @@ -0,0 +1,50 @@ +--TEST-- +Bug #41148 (pcre 7.0 regression) +--FILE-- +?php + +$letexte=brbr; +$ligne_horizontale = $puce = $debut_intertitre = $fin_intertitre = ''; + +$cherche1 = array( +/* 0 */ /\n(+|+)/S, +/* 1 */ /\n-- */S, +/* 2 */ /\n- */S, +/* 3 */ /\n_ +/S, +/* 4 */ /(^|[^{])[{][{][{]/S, +/* 5 */ /[}][}][}]($|[^}])/S, +/* 6 */ /(( *)\n){2,}(br[[:space:]]*\/?.)?/S, +/* 7 */ /[{][{]/S, +/* 8 */ /[}][}]/S, +/* 9 */ /[{]/S, +/* 10 *//[}]/S, +/* 11 *//(br[[:space:]]*\/?.){2,}/S, +/* 12 *//p([\n]*(br[[:space:]]*\/?.)*)*/S, +/* 13 *//quote/S, +/* 14 *//\/quote/S +); +$remplace1 = array( +/* 0 */ \n\n$ligne_horizontale\n\n, +/* 1 */ \nbr /mdash;nbsp;, +/* 2 */ \nbr /$pucenbsp;, +/* 3 */ \nbr /, +/* 4 */ \$1\n\n$debut_intertitre, +/* 5 */ $fin_intertitre\n\n\$1, +/* 6 */ p, +/* 7 */ strong class=\spip\, +/* 8 */ /strong, +/* 9 */ i class=\spip\, +/* 10 *//i, +/* 11 */p, +/* 12 */p, +/* 13 */blockquote class=\spip\p, +/* 14 *//blockquotep +); +$letexte = preg_replace($cherche1, $remplace1, $letexte); +$letexte = preg_replace(@^ br /@S, , $letexte); + +print $letexte; + +? +--EXPECT-- +p http://cvs.php.net/viewvc.cgi/php-src/ext/pcre/tests/bug41638.phpt?r1=1.1r2=1.2diff_format=u Index: php-src/ext/pcre/tests/bug41638.phpt diff -u /dev/null php-src/ext/pcre/tests/bug41638.phpt:1.2 --- /dev/null Fri Jun 15 12:04:26 2007 +++ php-src/ext/pcre/tests/bug41638.phptFri Jun 15 12:04:26 2007 @@ -0,0 +1,82 @@ +--TEST-- +Bug #41638 (pcre 7.0 regression) +--FILE-- +?php +$str = repeater id='loopt' dataSrc=subject colums=2; + +preg_match_all(/(['\])((.*(\\1)*)*)\\1/sU,$str,$str_instead); +print_r($str_instead); + +// these two are from Magnus Holmgren (extracted from a pcre-dev mailing list post) +preg_match_all(/(['\])((?:\\1|.)*)\\1/sU, $str, $str_instead); +print_r($str_instead); + +preg_match_all(/(['\])(.*)(?!)\\1/sU, $str, $str_instead); +print_r($str_instead); + +? +--EXPECT-- +Array +( +[0] = Array +( +[0] = 'loopt' +) + +[1] = Array +( +[0] = ' +) + +[2] = Array +( +[0] = loopt +) + +[3] = Array +( +[0] = t +) + +[4] = Array +( +[0] = +) + +) +Array +( +[0] = Array +( +[0] = 'loopt' +) + +[1] = Array +( +[0] = ' +) + +[2] = Array +( +[0] = loopt +) + +) +Array +( +[0] = Array +( +[0] = 'loopt' +) + +[1] = Array +( +[0] = ' +) + +[2] = Array +( +[0] = loopt +) + +) -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-CVS] cvs: php-src(PHP_5_2) /ext/gd/libgd gd.c
nlopess Fri Jun 15 19:47:10 2007 UTC Modified files: (Branch: PHP_5_2) /php-src/ext/gd/libgd gd.c Log: sync with libgd: improve _gdImageFillTiled() http://cvs.php.net/viewvc.cgi/php-src/ext/gd/libgd/gd.c?r1=1.90.2.1.2.13r2=1.90.2.1.2.14diff_format=u Index: php-src/ext/gd/libgd/gd.c diff -u php-src/ext/gd/libgd/gd.c:1.90.2.1.2.13 php-src/ext/gd/libgd/gd.c:1.90.2.1.2.14 --- php-src/ext/gd/libgd/gd.c:1.90.2.1.2.13 Thu Jun 14 19:17:31 2007 +++ php-src/ext/gd/libgd/gd.c Fri Jun 15 19:47:10 2007 @@ -1943,7 +1943,7 @@ #define FILL_POP(Y, XL, XR, DY) \ {sp--; Y = sp-y+(DY = sp-dy); XL = sp-xl; XR = sp-xr;} -void _gdImageFillTiled(gdImagePtr im, int x, int y, int nc); +static void _gdImageFillTiled(gdImagePtr im, int x, int y, int nc); void gdImageFill(gdImagePtr im, int x, int y, int nc) { @@ -2045,16 +2045,16 @@ im-alphaBlendingFlag = alphablending_bak; } -void _gdImageFillTiled(gdImagePtr im, int x, int y, int nc) +static void _gdImageFillTiled(gdImagePtr im, int x, int y, int nc) { - int i,l, x1, x2, dy; + int l, x1, x2, dy; int oc; /* old pixel value */ int tiled; int wx2,wy2; /* stack of filled segments */ struct seg *stack; struct seg *sp; - char **pts; + char *pts; if (!im-tile) { return; @@ -2064,11 +2064,7 @@ tiled = nc==gdTiled; nc = gdImageTileGet(im,x,y); - pts = (char **) ecalloc(im-sy, sizeof(char*)); - - for (i=0; iim-sy;i++) { - pts[i] = (char *) ecalloc(im-sx, sizeof(char)); - } + pts = (char *) ecalloc(im-sy * im-sx, sizeof(char)); stack = (struct seg *)safe_emalloc(sizeof(struct seg), ((int)(im-sy*im-sx)/4), 1); sp = stack; @@ -2081,9 +2077,9 @@ FILL_PUSH(y+1, x, x, -1); while (spstack) { FILL_POP(y, x1, x2, dy); - for (x=x1; x=0 (!pts[y][x] gdImageGetPixel(im,x,y)==oc); x--) { + for (x=x1; x=0 (!pts[y + x*wx2] gdImageGetPixel(im,x,y)==oc); x--) { nc = gdImageTileGet(im,x,y); - pts[y][x]=1; + pts[y + x*wx2]=1; gdImageSetPixel(im,x, y, nc); } if (x=x1) { @@ -2097,9 +2093,9 @@ } x = x1+1; do { - for (; xwx2 (!pts[y][x] gdImageGetPixel(im,x, y)==oc) ; x++) { + for (; xwx2 (!pts[y + x*wx2] gdImageGetPixel(im,x, y)==oc) ; x++) { nc = gdImageTileGet(im,x,y); - pts[y][x]=1; + pts[y + x*wx2]=1; gdImageSetPixel(im, x, y, nc); } FILL_PUSH(y, l, x-1, dy); @@ -2107,13 +2103,11 @@ if (xx2+1) { FILL_PUSH(y, x2+1, x-1, -dy); } -skip: for (x++; x=x2 (pts[y][x] || gdImageGetPixel(im,x, y)!=oc); x++); +skip: for (x++; x=x2 (pts[y + x*wx2] || gdImageGetPixel(im,x, y)!=oc); x++); l = x; } while (x=x2); } - for (i=0; iim-sy;i++) { - efree(pts[i]); - } + efree(pts); efree(stack); } -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-CVS] cvs: php-src /ext/gd/libgd gd.c
nlopess Fri Jun 15 19:50:05 2007 UTC Modified files: /php-src/ext/gd/libgd gd.c Log: MFB: sync with libgd: improve _gdImageFillTiled() http://cvs.php.net/viewvc.cgi/php-src/ext/gd/libgd/gd.c?r1=1.106r2=1.107diff_format=u Index: php-src/ext/gd/libgd/gd.c diff -u php-src/ext/gd/libgd/gd.c:1.106 php-src/ext/gd/libgd/gd.c:1.107 --- php-src/ext/gd/libgd/gd.c:1.106 Thu Jun 14 19:18:00 2007 +++ php-src/ext/gd/libgd/gd.c Fri Jun 15 19:50:05 2007 @@ -1941,7 +1941,7 @@ #define FILL_POP(Y, XL, XR, DY) \ {sp--; Y = sp-y+(DY = sp-dy); XL = sp-xl; XR = sp-xr;} -void _gdImageFillTiled(gdImagePtr im, int x, int y, int nc); +static void _gdImageFillTiled(gdImagePtr im, int x, int y, int nc); void gdImageFill(gdImagePtr im, int x, int y, int nc) { @@ -2042,16 +2042,16 @@ im-alphaBlendingFlag = alphablending_bak; } -void _gdImageFillTiled(gdImagePtr im, int x, int y, int nc) +static void _gdImageFillTiled(gdImagePtr im, int x, int y, int nc) { - int i,l, x1, x2, dy; + int l, x1, x2, dy; int oc; /* old pixel value */ int tiled; int wx2,wy2; /* stack of filled segments */ struct seg *stack; struct seg *sp; - char **pts; + char *pts; if (!im-tile) { return; @@ -2061,11 +2061,7 @@ tiled = nc==gdTiled; nc = gdImageTileGet(im,x,y); - pts = (char **) ecalloc(im-sy, sizeof(char*)); - - for (i=0; iim-sy;i++) { - pts[i] = (char *) ecalloc(im-sx, sizeof(char)); - } + pts = (char *) ecalloc(im-sy * im-sx, sizeof(char)); stack = (struct seg *)safe_emalloc(sizeof(struct seg), ((int)(im-sy*im-sx)/4), 1); sp = stack; @@ -2078,9 +2074,9 @@ FILL_PUSH(y+1, x, x, -1); while (spstack) { FILL_POP(y, x1, x2, dy); - for (x=x1; x=0 (!pts[y][x] gdImageGetPixel(im,x,y)==oc); x--) { + for (x=x1; x=0 (!pts[y + x*wx2] gdImageGetPixel(im,x,y)==oc); x--) { nc = gdImageTileGet(im,x,y); - pts[y][x]=1; + pts[y + x*wx2]=1; gdImageSetPixel(im,x, y, nc); } if (x=x1) { @@ -2094,9 +2090,9 @@ } x = x1+1; do { - for (; xwx2 (!pts[y][x] gdImageGetPixel(im,x, y)==oc) ; x++) { + for (; xwx2 (!pts[y + x*wx2] gdImageGetPixel(im,x, y)==oc) ; x++) { nc = gdImageTileGet(im,x,y); - pts[y][x]=1; + pts[y + x*wx2]=1; gdImageSetPixel(im, x, y, nc); } FILL_PUSH(y, l, x-1, dy); @@ -2104,13 +2100,11 @@ if (xx2+1) { FILL_PUSH(y, x2+1, x-1, -dy); } -skip: for (x++; x=x2 (pts[y][x] || gdImageGetPixel(im,x, y)!=oc); x++); +skip: for (x++; x=x2 (pts[y + x*wx2] || gdImageGetPixel(im,x, y)!=oc); x++); l = x; } while (x=x2); } - for (i=0; iim-sy;i++) { - efree(pts[i]); - } + efree(pts); efree(stack); } -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP-CVS] cvs: php-src(PHP_5_2) /ext/gd/libgd gd.c
+ pts = (char *) ecalloc(im-sy * im-sx, sizeof(char)); I don't see any overflow checks around, are you sure it's safe? -- Stanislav Malyshev, Zend Products Engineer [EMAIL PROTECTED] http://www.zend.com/ -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP-CVS] cvs: php-src(PHP_5_2) /ext/gd/libgd gd.c
Ah! good point, thanks. I'll check it out. Nuno - Original Message - + pts = (char *) ecalloc(im-sy * im-sx, sizeof(char)); I don't see any overflow checks around, are you sure it's safe? -- Stanislav Malyshev, Zend Products Engineer [EMAIL PROTECTED] http://www.zend.com/ -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-CVS] cvs: php-src(PHP_5_2) /ext/session session.c
stasFri Jun 15 22:40:00 2007 UTC Modified files: (Branch: PHP_5_2) /php-src/ext/sessionsession.c Log: Disallow characters that Cookie RFC does not allow in unquoted cookies http://cvs.php.net/viewvc.cgi/php-src/ext/session/session.c?r1=1.417.2.8.2.35r2=1.417.2.8.2.36diff_format=u Index: php-src/ext/session/session.c diff -u php-src/ext/session/session.c:1.417.2.8.2.35 php-src/ext/session/session.c:1.417.2.8.2.36 --- php-src/ext/session/session.c:1.417.2.8.2.35Thu Jun 7 08:59:00 2007 +++ php-src/ext/session/session.c Fri Jun 15 22:40:00 2007 @@ -17,7 +17,7 @@ +--+ */ -/* $Id: session.c,v 1.417.2.8.2.35 2007/06/07 08:59:00 tony2001 Exp $ */ +/* $Id: session.c,v 1.417.2.8.2.36 2007/06/15 22:40:00 stas Exp $ */ #ifdef HAVE_CONFIG_H #include config.h @@ -807,7 +807,7 @@ int vallen; /* check session name for invalid characters */ - if (PS(id) strpbrk(PS(id), \r\n\t '\\\)) { + if (PS(id) strpbrk(PS(id), \r\n\t '\\\()@,;:[]?={}%)) { efree(PS(id)); PS(id) = NULL; } -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-CVS] cvs: php-src /ext/session session.c
stasFri Jun 15 22:42:43 2007 UTC Modified files: /php-src/ext/sessionsession.c Log: MF5: Disallow characters that Cookie RFC does not allow in unquoted cookies http://cvs.php.net/viewvc.cgi/php-src/ext/session/session.c?r1=1.471r2=1.472diff_format=u Index: php-src/ext/session/session.c diff -u php-src/ext/session/session.c:1.471 php-src/ext/session/session.c:1.472 --- php-src/ext/session/session.c:1.471 Thu Jun 7 08:58:38 2007 +++ php-src/ext/session/session.c Fri Jun 15 22:42:43 2007 @@ -17,7 +17,7 @@ +--+ */ -/* $Id: session.c,v 1.471 2007/06/07 08:58:38 tony2001 Exp $ */ +/* $Id: session.c,v 1.472 2007/06/15 22:42:43 stas Exp $ */ #ifdef HAVE_CONFIG_H #include config.h @@ -398,7 +398,7 @@ int vallen; /* check session name for invalid characters */ - if (PS(id) strpbrk(PS(id), \r\n\t '\\\)) { + if (PS(id) strpbrk(PS(id), \r\n\t '\\\()@,;:[]?={}%)) { efree(PS(id)); PS(id) = NULL; } -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-CVS] cvs: php-src(PHP_4_4) /ext/session session.c
stasFri Jun 15 22:45:25 2007 UTC Modified files: (Branch: PHP_4_4) /php-src/ext/sessionsession.c Log: MF5: Disallow characters that Cookie RFC does not allow in unquoted cookies http://cvs.php.net/viewvc.cgi/php-src/ext/session/session.c?r1=1.336.2.53.2.18r2=1.336.2.53.2.19diff_format=u Index: php-src/ext/session/session.c diff -u php-src/ext/session/session.c:1.336.2.53.2.18 php-src/ext/session/session.c:1.336.2.53.2.19 --- php-src/ext/session/session.c:1.336.2.53.2.18 Wed May 16 01:34:14 2007 +++ php-src/ext/session/session.c Fri Jun 15 22:45:25 2007 @@ -17,7 +17,7 @@ +--+ */ -/* $Id: session.c,v 1.336.2.53.2.18 2007/05/16 01:34:14 stas Exp $ */ +/* $Id: session.c,v 1.336.2.53.2.19 2007/06/15 22:45:25 stas Exp $ */ #ifdef HAVE_CONFIG_H #include config.h @@ -666,7 +666,7 @@ int vallen; /* check session name for invalid characters */ - if (PS(id) strpbrk(PS(id), \r\n\t '\\\)) { + if (PS(id) strpbrk(PS(id), \r\n\t '\\\()@,;:[]?={}%)) { efree(PS(id)); PS(id) = NULL; } -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-CVS] cvs: CVSROOT / avail
andrei Sat Jun 16 02:10:11 2007 UTC Modified files: /CVSROOTavail Log: Give Anant and Elizabeth access to website. http://cvs.php.net/viewvc.cgi/CVSROOT/avail?r1=1.1279r2=1.1280diff_format=u Index: CVSROOT/avail diff -u CVSROOT/avail:1.1279 CVSROOT/avail:1.1280 --- CVSROOT/avail:1.1279Mon Jun 11 05:35:57 2007 +++ CVSROOT/avail Sat Jun 16 02:10:11 2007 @@ -107,7 +107,7 @@ # The PHP-GTK Web Group has access to the PHP-GTK website. -avail|fmk,jmoore,cmv,alan_k,sfox,imajes,ramsey,cweiske,scottmattocks|php-gtk-web +avail|fmk,jmoore,cmv,alan_k,sfox,imajes,ramsey,cweiske,scottmattocks,anant,auroraeosrose|php-gtk-web # The Smarty Group has access to the Smarty code -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php