[PHP-CVS] cvs: php-src(PHP_5_2) / NEWS /ext/standard array.c /ext/standard/tests/array bug38464.phpt
iliaa Wed Sep 6 17:25:58 2006 UTC Added files: (Branch: PHP_5_2) /php-src/ext/standard/tests/array bug38464.phpt Modified files: /php-srcNEWS /php-src/ext/standard array.c Log: Fixed bug #38464 (array_count_values() mishandles numeric strings). http://cvs.php.net/viewvc.cgi/php-src/NEWS?r1=1.2027.2.547.2.237&r2=1.2027.2.547.2.238&diff_format=u Index: php-src/NEWS diff -u php-src/NEWS:1.2027.2.547.2.237 php-src/NEWS:1.2027.2.547.2.238 --- php-src/NEWS:1.2027.2.547.2.237 Wed Sep 6 06:37:41 2006 +++ php-src/NEWSWed Sep 6 17:25:57 2006 @@ -6,7 +6,8 @@ - Fixed bug #38700 (SoapClient::__getTypes never returns). (Dmitry) - Fixed bug #38693 (curl_multi_add_handle() set curl handle to null). (Ilia) - Fixed bug #38661 (mixed-case URL breaks url-wrappers). (Ilia) - +- Fixed bug #38464 (array_count_values() mishandles numeric strings). + (php_lists at realplain dot com, Ilia) 31 Aug 2006, PHP 5.2.0RC3 - Updated PCRE to version 6.7. (Ilia) http://cvs.php.net/viewvc.cgi/php-src/ext/standard/array.c?r1=1.308.2.21.2.9&r2=1.308.2.21.2.10&diff_format=u Index: php-src/ext/standard/array.c diff -u php-src/ext/standard/array.c:1.308.2.21.2.9 php-src/ext/standard/array.c:1.308.2.21.2.10 --- php-src/ext/standard/array.c:1.308.2.21.2.9 Sun Jul 30 03:31:18 2006 +++ php-src/ext/standard/array.cWed Sep 6 17:25:57 2006 @@ -21,7 +21,7 @@ +--+ */ -/* $Id: array.c,v 1.308.2.21.2.9 2006/07/30 03:31:18 andrei Exp $ */ +/* $Id: array.c,v 1.308.2.21.2.10 2006/09/06 17:25:57 iliaa Exp $ */ #include "php.h" #include "php_ini.h" @@ -2548,46 +2548,17 @@ (void**)&tmp) == FAILURE) { zval *data; MAKE_STD_ZVAL(data); - Z_TYPE_P(data) = IS_LONG; - Z_LVAL_P(data) = 1; + ZVAL_LONG(data, 1); zend_hash_index_update(Z_ARRVAL_P(return_value), Z_LVAL_PP(entry), &data, sizeof(data), NULL); } else { Z_LVAL_PP(tmp)++; } } else if (Z_TYPE_PP(entry) == IS_STRING) { - /* make sure our array does not end up with numeric string keys -* but don't touch those strings that start with 0 */ - if (!(Z_STRLEN_PP(entry) > 1 && Z_STRVAL_PP(entry)[0] == '0') && is_numeric_string(Z_STRVAL_PP(entry), Z_STRLEN_PP(entry), NULL, NULL, 0) == IS_LONG) { - zval tmp_entry; - - tmp_entry = **entry; - zval_copy_ctor(&tmp_entry); - - convert_to_long(&tmp_entry); - - if (zend_hash_index_find(Z_ARRVAL_P(return_value), - Z_LVAL(tmp_entry), - (void**)&tmp) == FAILURE) { - zval *data; - MAKE_STD_ZVAL(data); - Z_TYPE_P(data) = IS_LONG; - Z_LVAL_P(data) = 1; - zend_hash_index_update(Z_ARRVAL_P(return_value), Z_LVAL(tmp_entry), &data, sizeof(data), NULL); - } else { - Z_LVAL_PP(tmp)++; - } - - zval_dtor(&tmp_entry); - zend_hash_move_forward_ex(myht, &pos); - continue; - } - - if (zend_hash_find(Z_ARRVAL_P(return_value), Z_STRVAL_PP(entry), Z_STRLEN_PP(entry)+1, (void**)&tmp) == FAILURE) { + if (zend_symtable_find(Z_ARRVAL_P(return_value), Z_STRVAL_PP(entry), Z_STRLEN_PP(entry) + 1, (void**)&tmp) == FAILURE) { zval *data; MAKE_STD_ZVAL(data); - Z_TYPE_P(data) = IS_LONG; - Z_LVAL_P(data) = 1; - zend_hash_update(Z_ARRVAL_P(return_value), Z_STRVAL_PP(entry), Z_STRLEN_PP(entry) + 1, &data, sizeof(data), NULL); + ZVAL_LONG(data, 1); + zend_symtable_update(Z_ARRVAL_P(return_value), Z_STRVAL_PP(entry), Z_STRLEN_PP(entry) + 1, &data, sizeof(data), NULL); } else { Z_LVAL_PP(tmp)++;
[PHP-CVS] cvs: php-src(PHP_5_2) /ext/iconv iconv.c /ext/iconv/tests iconv_strpos.phpt iconv_strrpos.phpt
tony2001Wed Sep 6 12:07:32 2006 UTC Modified files: (Branch: PHP_5_2) /php-src/ext/iconv iconv.c /php-src/ext/iconv/testsiconv_strpos.phpt iconv_strrpos.phpt Log: do not search for empty strings with strpos() and strrpos() http://cvs.php.net/viewvc.cgi/php-src/ext/iconv/iconv.c?r1=1.124.2.8.2.4&r2=1.124.2.8.2.5&diff_format=u Index: php-src/ext/iconv/iconv.c diff -u php-src/ext/iconv/iconv.c:1.124.2.8.2.4 php-src/ext/iconv/iconv.c:1.124.2.8.2.5 --- php-src/ext/iconv/iconv.c:1.124.2.8.2.4 Thu Aug 31 11:17:47 2006 +++ php-src/ext/iconv/iconv.c Wed Sep 6 12:07:32 2006 @@ -18,7 +18,7 @@ +--+ */ -/* $Id: iconv.c,v 1.124.2.8.2.4 2006/08/31 11:17:47 tony2001 Exp $ */ +/* $Id: iconv.c,v 1.124.2.8.2.5 2006/09/06 12:07:32 tony2001 Exp $ */ #ifdef HAVE_CONFIG_H #include "config.h" @@ -1946,6 +1946,10 @@ RETURN_FALSE; } + if (ndl_len < 1) { + RETURN_FALSE; + } + err = _php_iconv_strpos(&retval, haystk, haystk_len, ndl, ndl_len, offset, charset); _php_iconv_show_error(err, GENERIC_SUPERSET_NAME, charset TSRMLS_CC); @@ -1981,6 +1985,10 @@ RETURN_FALSE; } + if (ndl_len < 1) { + RETURN_FALSE; + } + err = _php_iconv_strpos(&retval, haystk, haystk_len, ndl, ndl_len, -1, charset); _php_iconv_show_error(err, GENERIC_SUPERSET_NAME, charset TSRMLS_CC); http://cvs.php.net/viewvc.cgi/php-src/ext/iconv/tests/iconv_strpos.phpt?r1=1.1&r2=1.1.6.1&diff_format=u Index: php-src/ext/iconv/tests/iconv_strpos.phpt diff -u php-src/ext/iconv/tests/iconv_strpos.phpt:1.1 php-src/ext/iconv/tests/iconv_strpos.phpt:1.1.6.1 --- php-src/ext/iconv/tests/iconv_strpos.phpt:1.1 Fri Jan 3 20:02:23 2003 +++ php-src/ext/iconv/tests/iconv_strpos.phpt Wed Sep 6 12:07:32 2006 @@ -31,6 +31,10 @@ foo(str_repeat("¤¢¤¤¤¦¤¨¤ª", 30)."¤¤¤¦¤ª¤¨¤¢".str_repeat("¤¢¤¤¤¨¤ª¤¦", 30), "¤¦¤ª", 0, "EUC-JP"); $str = str_repeat("¤¢¤¤¤¦¤¨¤ª", 60).'$'.str_repeat("¤¢¤¤¤¨¤ª¤¦", 60); foo($str, '$', 0, "ISO-2022-JP", "EUC-JP"); + +var_dump(iconv_strpos("string", "")); +var_dump(iconv_strpos("", "string")); + ?> --EXPECTF-- 2: %s @@ -50,3 +54,5 @@ int(151) int(1) int(300) +bool(false) +bool(false) http://cvs.php.net/viewvc.cgi/php-src/ext/iconv/tests/iconv_strrpos.phpt?r1=1.1&r2=1.1.6.1&diff_format=u Index: php-src/ext/iconv/tests/iconv_strrpos.phpt diff -u php-src/ext/iconv/tests/iconv_strrpos.phpt:1.1 php-src/ext/iconv/tests/iconv_strrpos.phpt:1.1.6.1 --- php-src/ext/iconv/tests/iconv_strrpos.phpt:1.1 Fri Jan 3 20:02:23 2003 +++ php-src/ext/iconv/tests/iconv_strrpos.phpt Wed Sep 6 12:07:32 2006 @@ -32,6 +32,10 @@ $str = str_repeat("¤¢¤¤¤¦¤¨¤ª", 60).str_repeat('$', $i).str_repeat("¤¢¤¤¤¨¤ª¤¦", 60); foo($str, '$', "ISO-2022-JP", "EUC-JP"); } + +var_dump(iconv_strrpos("string", "")); +var_dump(iconv_strrpos("", "string")); + ?> --EXPECT-- int(14) @@ -54,3 +58,5 @@ int(304) int(606) int(305) +bool(false) +bool(false) -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-CVS] cvs: php-src /ext/iconv iconv.c /ext/iconv/tests iconv_strpos.phpt iconv_strrpos.phpt
tony2001Wed Sep 6 12:07:27 2006 UTC Modified files: /php-src/ext/iconv iconv.c /php-src/ext/iconv/testsiconv_strpos.phpt iconv_strrpos.phpt Log: do not search for empty strings with strpos() and strrpos() http://cvs.php.net/viewvc.cgi/php-src/ext/iconv/iconv.c?r1=1.139&r2=1.140&diff_format=u Index: php-src/ext/iconv/iconv.c diff -u php-src/ext/iconv/iconv.c:1.139 php-src/ext/iconv/iconv.c:1.140 --- php-src/ext/iconv/iconv.c:1.139 Thu Aug 31 11:17:37 2006 +++ php-src/ext/iconv/iconv.c Wed Sep 6 12:07:27 2006 @@ -18,7 +18,7 @@ +--+ */ -/* $Id: iconv.c,v 1.139 2006/08/31 11:17:37 tony2001 Exp $ */ +/* $Id: iconv.c,v 1.140 2006/09/06 12:07:27 tony2001 Exp $ */ #ifdef HAVE_CONFIG_H #include "config.h" @@ -1949,6 +1949,10 @@ RETURN_FALSE; } + if (ndl_len < 1) { + RETURN_FALSE; + } + err = _php_iconv_strpos(&retval, haystk, haystk_len, ndl, ndl_len, offset, charset); _php_iconv_show_error(err, GENERIC_SUPERSET_NAME, charset TSRMLS_CC); @@ -1984,6 +1988,10 @@ RETURN_FALSE; } + if (ndl_len < 1) { + RETURN_FALSE; + } + err = _php_iconv_strpos(&retval, haystk, haystk_len, ndl, ndl_len, -1, charset); _php_iconv_show_error(err, GENERIC_SUPERSET_NAME, charset TSRMLS_CC); http://cvs.php.net/viewvc.cgi/php-src/ext/iconv/tests/iconv_strpos.phpt?r1=1.2&r2=1.3&diff_format=u Index: php-src/ext/iconv/tests/iconv_strpos.phpt diff -u php-src/ext/iconv/tests/iconv_strpos.phpt:1.2 php-src/ext/iconv/tests/iconv_strpos.phpt:1.3 --- php-src/ext/iconv/tests/iconv_strpos.phpt:1.2 Wed Aug 17 14:01:03 2005 +++ php-src/ext/iconv/tests/iconv_strpos.phpt Wed Sep 6 12:07:27 2006 @@ -33,6 +33,9 @@ foo(str_repeat("¤¢¤¤¤¦¤¨¤ª", 30)."¤¤¤¦¤ª¤¨¤¢".str_repeat("¤¢¤¤¤¨¤ª¤¦", 30), "¤¦¤ª", 0, "EUC-JP"); $str = str_repeat("¤¢¤¤¤¦¤¨¤ª", 60).'$'.str_repeat("¤¢¤¤¤¨¤ª¤¦", 60); foo($str, '$', 0, "ISO-2022-JP", "EUC-JP"); + +var_dump(iconv_strpos("string", "")); +var_dump(iconv_strpos("", "string")); ?> --EXPECTF-- 2: %s @@ -52,3 +55,5 @@ int(151) int(1) int(300) +bool(false) +bool(false) http://cvs.php.net/viewvc.cgi/php-src/ext/iconv/tests/iconv_strrpos.phpt?r1=1.2&r2=1.3&diff_format=u Index: php-src/ext/iconv/tests/iconv_strrpos.phpt diff -u php-src/ext/iconv/tests/iconv_strrpos.phpt:1.2 php-src/ext/iconv/tests/iconv_strrpos.phpt:1.3 --- php-src/ext/iconv/tests/iconv_strrpos.phpt:1.2 Wed Aug 17 14:01:03 2005 +++ php-src/ext/iconv/tests/iconv_strrpos.phpt Wed Sep 6 12:07:27 2006 @@ -34,6 +34,9 @@ $str = str_repeat("¤¢¤¤¤¦¤¨¤ª", 60).str_repeat('$', $i).str_repeat("¤¢¤¤¤¨¤ª¤¦", 60); foo($str, '$', "ISO-2022-JP", "EUC-JP"); } + +var_dump(iconv_strrpos("string", "")); +var_dump(iconv_strrpos("", "string")); ?> --EXPECT-- int(14) @@ -56,3 +59,5 @@ int(304) int(606) int(305) +bool(false) +bool(false) -- 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/zip php_zip.c
pajoye Wed Sep 6 17:24:41 2006 UTC Modified files: (Branch: PHP_5_2) /php-src/ext/zipphp_zip.c Log: - wrong cast, strlen is int http://cvs.php.net/viewvc.cgi/php-src/ext/zip/php_zip.c?r1=1.1.2.10&r2=1.1.2.11&diff_format=u Index: php-src/ext/zip/php_zip.c diff -u php-src/ext/zip/php_zip.c:1.1.2.10 php-src/ext/zip/php_zip.c:1.1.2.11 --- php-src/ext/zip/php_zip.c:1.1.2.10 Wed Sep 6 15:19:41 2006 +++ php-src/ext/zip/php_zip.c Wed Sep 6 17:24:41 2006 @@ -16,7 +16,7 @@ +--+ */ -/* $Id: php_zip.c,v 1.1.2.10 2006/09/06 15:19:41 nlopess Exp $ */ +/* $Id: php_zip.c,v 1.1.2.11 2006/09/06 17:24:41 pajoye Exp $ */ #ifdef HAVE_CONFIG_H #include "config.h" @@ -1273,7 +1273,7 @@ } comment = zip_get_archive_comment(intern, &comment_len, (int)flags); - RETURN_STRINGL((char *)comment, (long)comment_len, 1); + RETURN_STRINGL((char *)comment, comment_len, 1); } /* }}} */ @@ -1360,7 +1360,7 @@ PHP_ZIP_STAT_PATH(intern, name, name_len, 0, sb); comment = zip_get_file_comment(intern, sb.index, &comment_len, (int)flags); - RETURN_STRINGL((char *)comment, (long)comment_len, 1); + RETURN_STRINGL((char *)comment, comment_len, 1); } /* }}} */ @@ -1389,7 +1389,7 @@ PHP_ZIP_STAT_INDEX(intern, index, 0, sb); comment = zip_get_file_comment(intern, index, &comment_len, (int)flags); - RETURN_STRINGL((char *)comment, (long)comment_len, 1); + RETURN_STRINGL((char *)comment, comment_len, 1); } /* }}} */ @@ -1983,7 +1983,7 @@ php_info_print_table_start(); php_info_print_table_row(2, "Zip", "enabled"); - php_info_print_table_row(2, "Extension Version","$Id: php_zip.c,v 1.1.2.10 2006/09/06 15:19:41 nlopess Exp $"); + php_info_print_table_row(2, "Extension Version","$Id: php_zip.c,v 1.1.2.11 2006/09/06 17:24:41 pajoye Exp $"); php_info_print_table_row(2, "Zip version", "1.7.1"); php_info_print_table_row(2, "Libzip version", "0.7.1"); -- 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/libxml php_libxml2.def
rrichards Wed Sep 6 23:49:00 2006 UTC Modified files: (Branch: PHP_5_2) /php-src/ext/libxml php_libxml2.def Log: MFH: update def file (2.6.26) http://cvs.php.net/viewvc.cgi/php-src/ext/libxml/php_libxml2.def?r1=1.4.2.1&r2=1.4.2.1.2.1&diff_format=u Index: php-src/ext/libxml/php_libxml2.def diff -u php-src/ext/libxml/php_libxml2.def:1.4.2.1 php-src/ext/libxml/php_libxml2.def:1.4.2.1.2.1 --- php-src/ext/libxml/php_libxml2.def:1.4.2.1 Sun Dec 11 21:54:32 2005 +++ php-src/ext/libxml/php_libxml2.def Wed Sep 6 23:49:00 2006 @@ -1389,8 +1389,10 @@ xmlXPathCompareValues xmlXPathCompile xmlXPathCompiledEval +xmlXPathCompiledEvalToBoolean xmlXPathConcatFunction xmlXPathContainsFunction +xmlXPathContextSetCache xmlXPathConvertBoolean xmlXPathConvertNumber xmlXPathConvertString -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-CVS] cvs: php-src /ext/libxml php_libxml2.def
rrichards Wed Sep 6 23:48:02 2006 UTC Modified files: /php-src/ext/libxml php_libxml2.def Log: update def file http://cvs.php.net/viewvc.cgi/php-src/ext/libxml/php_libxml2.def?r1=1.5&r2=1.6&diff_format=u Index: php-src/ext/libxml/php_libxml2.def diff -u php-src/ext/libxml/php_libxml2.def:1.5 php-src/ext/libxml/php_libxml2.def:1.6 --- php-src/ext/libxml/php_libxml2.def:1.5 Sun Dec 11 21:55:00 2005 +++ php-src/ext/libxml/php_libxml2.def Wed Sep 6 23:48:02 2006 @@ -1389,8 +1389,10 @@ xmlXPathCompareValues xmlXPathCompile xmlXPathCompiledEval +xmlXPathCompiledEvalToBoolean xmlXPathConcatFunction xmlXPathContainsFunction +xmlXPathContextSetCache xmlXPathConvertBoolean xmlXPathConvertNumber xmlXPathConvertString -- 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/domxml php_domxml.c
edink Wed Sep 6 22:08:04 2006 UTC Modified files: (Branch: PHP_4_4) /php-src/ext/domxml php_domxml.c Log: Slightly different definiton for php4 http://cvs.php.net/viewvc.cgi/php-src/ext/domxml/php_domxml.c?r1=1.218.2.50.2.3&r2=1.218.2.50.2.4&diff_format=u Index: php-src/ext/domxml/php_domxml.c diff -u php-src/ext/domxml/php_domxml.c:1.218.2.50.2.3 php-src/ext/domxml/php_domxml.c:1.218.2.50.2.4 --- php-src/ext/domxml/php_domxml.c:1.218.2.50.2.3 Wed Sep 6 21:55:26 2006 +++ php-src/ext/domxml/php_domxml.c Wed Sep 6 22:08:04 2006 @@ -16,7 +16,7 @@ +--+ */ -/* $Id: php_domxml.c,v 1.218.2.50.2.3 2006/09/06 21:55:26 edink Exp $ */ +/* $Id: php_domxml.c,v 1.218.2.50.2.4 2006/09/06 22:08:04 edink Exp $ */ /* TODO * - Support Notation Nodes @@ -5521,7 +5521,7 @@ #endif /* HAVE_DOMXSLT */ #ifdef PHP_WIN32 -PHP_LIBXML_API BOOL WINAPI DllMain(HINSTANCE hinstDLL, DWORD fdwReason, LPVOID lpvReserved) +__declspec(dllexport) BOOL WINAPI DllMain(HINSTANCE hinstDLL, DWORD fdwReason, LPVOID lpvReserved) { return xmlDllMain(hinstDLL, fdwReason, lpvReserved); } -- 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/domxml php_domxml.c
edink Wed Sep 6 21:55:26 2006 UTC Modified files: (Branch: PHP_4_4) /php-src/ext/domxml php_domxml.c Log: MFOB: Fixed bug #38190 (threading issues on windows 2003) http://cvs.php.net/viewvc.cgi/php-src/ext/domxml/php_domxml.c?r1=1.218.2.50.2.2&r2=1.218.2.50.2.3&diff_format=u Index: php-src/ext/domxml/php_domxml.c diff -u php-src/ext/domxml/php_domxml.c:1.218.2.50.2.2 php-src/ext/domxml/php_domxml.c:1.218.2.50.2.3 --- php-src/ext/domxml/php_domxml.c:1.218.2.50.2.2 Sat Mar 18 10:46:27 2006 +++ php-src/ext/domxml/php_domxml.c Wed Sep 6 21:55:26 2006 @@ -16,7 +16,7 @@ +--+ */ -/* $Id: php_domxml.c,v 1.218.2.50.2.2 2006/03/18 10:46:27 rrichards Exp $ */ +/* $Id: php_domxml.c,v 1.218.2.50.2.3 2006/09/06 21:55:26 edink Exp $ */ /* TODO * - Support Notation Nodes @@ -5520,6 +5520,13 @@ /* }}} */ #endif /* HAVE_DOMXSLT */ +#ifdef PHP_WIN32 +PHP_LIBXML_API BOOL WINAPI DllMain(HINSTANCE hinstDLL, DWORD fdwReason, LPVOID lpvReserved) +{ + return xmlDllMain(hinstDLL, fdwReason, lpvReserved); +} +#endif + #endif /* HAVE_DOMXML */ /* -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-CVS] cvs: php-src /ext/libxml libxml.c
edink Wed Sep 6 21:48:57 2006 UTC Modified files: /php-src/ext/libxml libxml.c Log: MFB: Fixed bug #38190 (threading issues on windows 2003) http://cvs.php.net/viewvc.cgi/php-src/ext/libxml/libxml.c?r1=1.52&r2=1.53&diff_format=u Index: php-src/ext/libxml/libxml.c diff -u php-src/ext/libxml/libxml.c:1.52 php-src/ext/libxml/libxml.c:1.53 --- php-src/ext/libxml/libxml.c:1.52Tue Sep 5 12:42:25 2006 +++ php-src/ext/libxml/libxml.c Wed Sep 6 21:48:57 2006 @@ -17,7 +17,7 @@ +--+ */ -/* $Id: libxml.c,v 1.52 2006/09/05 12:42:25 nlopess Exp $ */ +/* $Id: libxml.c,v 1.53 2006/09/06 21:48:57 edink Exp $ */ #define IS_EXT_MODULE @@ -1043,6 +1043,13 @@ } /* }}} */ +#ifdef PHP_WIN32 +PHP_LIBXML_API BOOL WINAPI DllMain(HINSTANCE hinstDLL, DWORD fdwReason, LPVOID lpvReserved) +{ + return xmlDllMain(hinstDLL, fdwReason, lpvReserved); +} +#endif + #endif /* -- 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/libxml libxml.c
edink Wed Sep 6 21:44:45 2006 UTC Modified files: (Branch: PHP_5_2) /php-src/ext/libxml libxml.c Log: Fixed bug #38190 (threading issues on windows 2003) http://cvs.php.net/viewvc.cgi/php-src/ext/libxml/libxml.c?r1=1.32.2.7.2.7&r2=1.32.2.7.2.8&diff_format=u Index: php-src/ext/libxml/libxml.c diff -u php-src/ext/libxml/libxml.c:1.32.2.7.2.7 php-src/ext/libxml/libxml.c:1.32.2.7.2.8 --- php-src/ext/libxml/libxml.c:1.32.2.7.2.7Tue Sep 5 12:39:20 2006 +++ php-src/ext/libxml/libxml.c Wed Sep 6 21:44:45 2006 @@ -17,7 +17,7 @@ +--+ */ -/* $Id: libxml.c,v 1.32.2.7.2.7 2006/09/05 12:39:20 nlopess Exp $ */ +/* $Id: libxml.c,v 1.32.2.7.2.8 2006/09/06 21:44:45 edink Exp $ */ #define IS_EXT_MODULE @@ -1033,6 +1033,13 @@ } /* }}} */ +#ifdef PHP_WIN32 +PHP_LIBXML_API BOOL WINAPI DllMain(HINSTANCE hinstDLL, DWORD fdwReason, LPVOID lpvReserved) +{ + return xmlDllMain(hinstDLL, fdwReason, lpvReserved); +} +#endif + #endif /* -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-CVS] cvs: php-src /ext/iconv iconv.c php_iconv.h
mikeWed Sep 6 20:49:03 2006 UTC Modified files: /php-src/ext/iconv iconv.c php_iconv.h Log: - upgrade ob_iconv_handler http://cvs.php.net/viewvc.cgi/php-src/ext/iconv/iconv.c?r1=1.140&r2=1.141&diff_format=u Index: php-src/ext/iconv/iconv.c diff -u php-src/ext/iconv/iconv.c:1.140 php-src/ext/iconv/iconv.c:1.141 --- php-src/ext/iconv/iconv.c:1.140 Wed Sep 6 12:07:27 2006 +++ php-src/ext/iconv/iconv.c Wed Sep 6 20:49:03 2006 @@ -18,7 +18,7 @@ +--+ */ -/* $Id: iconv.c,v 1.140 2006/09/06 12:07:27 tony2001 Exp $ */ +/* $Id: iconv.c,v 1.141 2006/09/06 20:49:03 mike Exp $ */ #ifdef HAVE_CONFIG_H #include "config.h" @@ -121,12 +121,6 @@ ZEND_END_ARG_INFO() static -ZEND_BEGIN_ARG_INFO(arginfo_ob_iconv_handler, 0) - ZEND_ARG_INFO(0, contents) - ZEND_ARG_INFO(0, status) -ZEND_END_ARG_INFO() - -static ZEND_BEGIN_ARG_INFO(arginfo_iconv_set_encoding, 0) ZEND_ARG_INFO(0, type) ZEND_ARG_INFO(0, charset) @@ -143,7 +137,6 @@ */ zend_function_entry iconv_functions[] = { PHP_NAMED_FE(iconv,php_if_iconv, arginfo_iconv) - PHP_FE(ob_iconv_handler, arginfo_ob_iconv_handler) PHP_FE(iconv_get_encoding, arginfo_iconv_get_encoding) PHP_FE(iconv_set_encoding, arginfo_iconv_set_encoding) PHP_FE(iconv_strlen, arginfo_iconv_strlen) @@ -225,6 +218,10 @@ static php_iconv_err_t php_iconv_stream_filter_register_factory(TSRMLS_D); static php_iconv_err_t php_iconv_stream_filter_unregister_factory(TSRMLS_D); + +static int php_iconv_output_conflict(zval *handler_name TSRMLS_DC); +static php_output_handler *php_iconv_output_handler_init(zval *name, size_t chunk_size, int flags TSRMLS_DC); +static int php_iconv_output_handler(void **nothing, php_output_context *output_context); /* }}} */ /* {{{ static globals */ @@ -275,6 +272,9 @@ if (php_iconv_stream_filter_register_factory(TSRMLS_C) != PHP_ICONV_ERR_SUCCESS) { return FAILURE; } + + PHP_OUTPUT_ALIAS_REGISTER("ob_iconv_handler", php_iconv_output_handler_init); + PHP_OUTPUT_CONFLICT_REGISTER("ob_iconv_handler", php_iconv_output_conflict); return SUCCESS; } @@ -313,6 +313,69 @@ } /* }}} */ +static int php_iconv_output_conflict(zval *handler_name TSRMLS_DC) +{ + if (php_output_get_level(TSRMLS_C)) { + PHP_OUTPUT_CONFLICT("ob_iconv_handler", return FAILURE); + PHP_OUTPUT_CONFLICT("mb_output_handler", return FAILURE); + } + return SUCCESS; +} + +static php_output_handler *php_iconv_output_handler_init(zval *handler_name, size_t chunk_size, int flags TSRMLS_DC) +{ + return php_output_handler_create_internal(handler_name, php_iconv_output_handler, chunk_size, flags TSRMLS_CC); +} + +static int php_iconv_output_handler(void **nothing, php_output_context *output_context) +{ + char *s, *output_encoding, *content_type, *mimetype = NULL; + int output_status, mimetype_len = 0; + PHP_OUTPUT_TSRMLS(output_context); + + if (output_context->op & PHP_OUTPUT_HANDLER_START) { + output_status = php_output_get_status(TSRMLS_C); + if (output_status & PHP_OUTPUT_SENT) { + return FAILURE; + } + + if (UG(unicode)) { + output_encoding = INI_STR("unicode.output_encoding"); + if (output_encoding && *output_encoding && strcasecmp(INI_STR("unicode.output_encoding"), ICONVG(internal_encoding))) { + php_error_docref(NULL TSRMLS_CC, E_WARNING, "unicode.output_encoding differs from iconv.internal_encoding (%s, %s)", output_encoding, ICONVG(internal_encoding)); + efree(ICONVG(input_encoding)); + ICONVG(input_encoding) = estrdup(output_encoding); + } + } + + if (SG(sapi_headers).mimetype && !strncasecmp(SG(sapi_headers).mimetype, "text/", 5)) { + if ((s = strchr(SG(sapi_headers).mimetype,';')) == NULL){ + mimetype = SG(sapi_headers).mimetype; + } else { + mimetype = SG(sapi_headers).mimetype; + mimetype_len = s - SG(sapi_headers).mimetype; + } + } else if (SG(sapi_headers).send_default_content_type) { + mimetype = SG(default_mimetype) ? SG(default_mimetype) : SAPI_DEFAULT_MIMETYPE; + } + + if (mimetype != NULL && !(output_st
[PHP-CVS] cvs: php-src /ext/zip php_zip.c
bjori Wed Sep 6 19:50:22 2006 UTC Modified files: /php-src/ext/zipphp_zip.c Log: fix build http://cvs.php.net/viewvc.cgi/php-src/ext/zip/php_zip.c?r1=1.12&r2=1.13&diff_format=u Index: php-src/ext/zip/php_zip.c diff -u php-src/ext/zip/php_zip.c:1.12 php-src/ext/zip/php_zip.c:1.13 --- php-src/ext/zip/php_zip.c:1.12 Wed Sep 6 17:39:33 2006 +++ php-src/ext/zip/php_zip.c Wed Sep 6 19:50:22 2006 @@ -16,7 +16,7 @@ +--+ */ -/* $Id: php_zip.c,v 1.12 2006/09/06 17:39:33 pajoye Exp $ */ +/* $Id: php_zip.c,v 1.13 2006/09/06 19:50:22 bjori Exp $ */ #ifdef HAVE_CONFIG_H #include "config.h" @@ -1286,7 +1286,7 @@ { struct zip *intern; zval *this = getThis(); - long index + long index; int comment_len; char * comment; struct zip_stat sb; @@ -1958,7 +1958,7 @@ php_info_print_table_start(); php_info_print_table_row(2, "Zip", "enabled"); - php_info_print_table_row(2, "Extension Version","$Id: php_zip.c,v 1.12 2006/09/06 17:39:33 pajoye Exp $"); + php_info_print_table_row(2, "Extension Version","$Id: php_zip.c,v 1.13 2006/09/06 19:50:22 bjori Exp $"); php_info_print_table_row(2, "Zip version", "2.0.0"); php_info_print_table_row(2, "Libzip version", "0.7.1"); -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-CVS] cvs: php-src /ext/tidy php_tidy.h tidy.c /ext/tidy/tests 017a.phpt
mikeWed Sep 6 17:55:09 2006 UTC Added files: /php-src/ext/tidy/tests 017a.phpt Modified files: /php-src/ext/tidy php_tidy.h tidy.c Log: - upgrade ob_tidyhandler http://cvs.php.net/viewvc.cgi/php-src/ext/tidy/php_tidy.h?r1=1.32&r2=1.33&diff_format=u Index: php-src/ext/tidy/php_tidy.h diff -u php-src/ext/tidy/php_tidy.h:1.32 php-src/ext/tidy/php_tidy.h:1.33 --- php-src/ext/tidy/php_tidy.h:1.32Tue Sep 5 15:25:44 2006 +++ php-src/ext/tidy/php_tidy.h Wed Sep 6 17:55:09 2006 @@ -16,7 +16,7 @@ +--+ */ -/* $Id: php_tidy.h,v 1.32 2006/09/05 15:25:44 nlopess Exp $ */ +/* $Id: php_tidy.h,v 1.33 2006/09/06 17:55:09 mike Exp $ */ #ifndef PHP_TIDY_H #define PHP_TIDY_H @@ -41,7 +41,8 @@ ZEND_BEGIN_MODULE_GLOBALS(tidy) char *default_config; -zval *inst; + zval *inst; + zend_bool clean_output; ZEND_END_MODULE_GLOBALS(tidy) #ifdef ZTS http://cvs.php.net/viewvc.cgi/php-src/ext/tidy/tidy.c?r1=1.97&r2=1.98&diff_format=u Index: php-src/ext/tidy/tidy.c diff -u php-src/ext/tidy/tidy.c:1.97 php-src/ext/tidy/tidy.c:1.98 --- php-src/ext/tidy/tidy.c:1.97Tue Sep 5 15:25:44 2006 +++ php-src/ext/tidy/tidy.c Wed Sep 6 17:55:09 2006 @@ -16,7 +16,7 @@ +--+ */ -/* $Id: tidy.c,v 1.97 2006/09/05 15:25:44 nlopess Exp $ */ +/* $Id: tidy.c,v 1.98 2006/09/06 17:55:09 mike Exp $ */ #ifdef HAVE_CONFIG_H #include "config.h" @@ -233,6 +233,10 @@ static int _php_tidy_apply_config_array(TidyDoc doc, HashTable *ht_options TSRMLS_DC); static void _php_tidy_register_nodetypes(INIT_FUNC_ARGS); static void _php_tidy_register_tags(INIT_FUNC_ARGS); +static PHP_INI_MH(php_tidy_set_clean_output); +static void php_tidy_clean_output_start(zval *name TSRMLS_DC); +static php_output_handler *php_tidy_output_handler_init(zval *handler_name, size_t chunk_size, int flags TSRMLS_DC); +static int php_tidy_output_handler(void **nothing, php_output_context *output_context); static PHP_MINIT_FUNCTION(tidy); static PHP_MSHUTDOWN_FUNCTION(tidy); @@ -263,8 +267,6 @@ static PHP_FUNCTION(tidy_access_count); static PHP_FUNCTION(tidy_config_count); -static PHP_FUNCTION(ob_tidyhandler); - static PHP_FUNCTION(tidy_get_root); static PHP_FUNCTION(tidy_get_html); static PHP_FUNCTION(tidy_get_head); @@ -288,8 +290,8 @@ ZEND_DECLARE_MODULE_GLOBALS(tidy) PHP_INI_BEGIN() -STD_PHP_INI_ENTRY("tidy.default_config", "", PHP_INI_SYSTEM, OnUpdateString, default_config, zend_tidy_globals, tidy_globals) -PHP_INI_ENTRY("tidy.clean_output", "0",PHP_INI_PERDIR, NULL) +STD_PHP_INI_ENTRY("tidy.default_config", "", PHP_INI_SYSTEM, OnUpdateString, default_config, zend_tidy_globals, tidy_globals) +STD_PHP_INI_ENTRY("tidy.clean_output", "0",PHP_INI_USER, php_tidy_set_clean_output, clean_output, zend_tidy_globals, tidy_globals) PHP_INI_END() static zend_function_entry tidy_functions[] = { @@ -319,7 +321,6 @@ PHP_FE(tidy_get_head, NULL) PHP_FE(tidy_get_html, NULL) PHP_FE(tidy_get_body, NULL) - PHP_FE(ob_tidyhandler, NULL) {NULL, NULL, NULL} }; @@ -605,11 +606,6 @@ break; case is_doc: - tidySetMallocCall(php_tidy_malloc); - tidySetReallocCall(php_tidy_realloc); - tidySetFreeCall(php_tidy_free); - tidySetPanicCall(php_tidy_panic); - intern->ptdoc = emalloc(sizeof(PHPTidyDoc)); intern->ptdoc->doc = tidyCreate(); intern->ptdoc->ref_count = 1; @@ -984,6 +980,11 @@ static PHP_MINIT_FUNCTION(tidy) { + tidySetMallocCall(php_tidy_malloc); + tidySetReallocCall(php_tidy_realloc); + tidySetFreeCall(php_tidy_free); + tidySetPanicCall(php_tidy_panic); + REGISTER_INI_ENTRIES(); REGISTER_TIDY_CLASS(tidy, doc, NULL, 0); REGISTER_TIDY_CLASS(tidyNode, node, NULL, ZEND_ACC_FINAL_CLASS); @@ -999,21 +1000,20 @@ _php_tidy_register_tags(INIT_FUNC_ARGS_PASSTHRU); _php_tidy_register_nodetypes(INIT_FUNC_ARGS_PASSTHRU); + PHP_OUTPUT_ALIAS_REGISTER("ob_tidyhandler", php_tidy_output_handler_init); + return SUCCESS; } static PHP_RINIT_FUNCTION(tidy) { - if (INI_BOOL("tidy.clean_output") == TRUE) { - zval *name; - MAKE_STD_ZVAL(name); - ZVAL_ASCII_STRINGL(name, "ob_tidyhandler", sizeof("ob_tidyhandler")-1, ZSTR_DUPLICATE); - if (php_output_start_user(name, 0, PHP_OUTPUT_HANDLER_STDFLAGS TSRMLS_CC) == FAILURE) { - z
[PHP-CVS] cvs: php-src /ext/zip php_zip.c
pajoye Wed Sep 6 17:39:33 2006 UTC Modified files: /php-src/ext/zipphp_zip.c Log: - bump zip version, 2.0.0 http://cvs.php.net/viewvc.cgi/php-src/ext/zip/php_zip.c?r1=1.11&r2=1.12&diff_format=u Index: php-src/ext/zip/php_zip.c diff -u php-src/ext/zip/php_zip.c:1.11 php-src/ext/zip/php_zip.c:1.12 --- php-src/ext/zip/php_zip.c:1.11 Wed Sep 6 15:13:16 2006 +++ php-src/ext/zip/php_zip.c Wed Sep 6 17:39:33 2006 @@ -16,7 +16,7 @@ +--+ */ -/* $Id: php_zip.c,v 1.11 2006/09/06 15:13:16 nlopess Exp $ */ +/* $Id: php_zip.c,v 1.12 2006/09/06 17:39:33 pajoye Exp $ */ #ifdef HAVE_CONFIG_H #include "config.h" @@ -1958,8 +1958,8 @@ php_info_print_table_start(); php_info_print_table_row(2, "Zip", "enabled"); - php_info_print_table_row(2, "Extension Version","$Id: php_zip.c,v 1.11 2006/09/06 15:13:16 nlopess Exp $"); - php_info_print_table_row(2, "Zip version", "1.7.1"); + php_info_print_table_row(2, "Extension Version","$Id: php_zip.c,v 1.12 2006/09/06 17:39:33 pajoye Exp $"); + php_info_print_table_row(2, "Zip version", "2.0.0"); php_info_print_table_row(2, "Libzip version", "0.7.1"); php_info_print_table_end(); -- 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/zip php_zip.c
pajoye Wed Sep 6 17:38:36 2006 UTC Modified files: (Branch: PHP_5_2) /php-src/ext/zipphp_zip.c Log: - bump version, 5.2.0 will have zip-2.0.0-stable http://cvs.php.net/viewvc.cgi/php-src/ext/zip/php_zip.c?r1=1.1.2.11&r2=1.1.2.12&diff_format=u Index: php-src/ext/zip/php_zip.c diff -u php-src/ext/zip/php_zip.c:1.1.2.11 php-src/ext/zip/php_zip.c:1.1.2.12 --- php-src/ext/zip/php_zip.c:1.1.2.11 Wed Sep 6 17:24:41 2006 +++ php-src/ext/zip/php_zip.c Wed Sep 6 17:38:36 2006 @@ -16,7 +16,7 @@ +--+ */ -/* $Id: php_zip.c,v 1.1.2.11 2006/09/06 17:24:41 pajoye Exp $ */ +/* $Id: php_zip.c,v 1.1.2.12 2006/09/06 17:38:36 pajoye Exp $ */ #ifdef HAVE_CONFIG_H #include "config.h" @@ -1983,8 +1983,8 @@ php_info_print_table_start(); php_info_print_table_row(2, "Zip", "enabled"); - php_info_print_table_row(2, "Extension Version","$Id: php_zip.c,v 1.1.2.11 2006/09/06 17:24:41 pajoye Exp $"); - php_info_print_table_row(2, "Zip version", "1.7.1"); + php_info_print_table_row(2, "Extension Version","$Id: php_zip.c,v 1.1.2.12 2006/09/06 17:38:36 pajoye Exp $"); + php_info_print_table_row(2, "Zip version", "2.0.0"); php_info_print_table_row(2, "Libzip version", "0.7.1"); php_info_print_table_end(); -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-CVS] cvs: php-src /ext/standard array.c /ext/standard/tests/array bug38464.phpt
iliaa Wed Sep 6 17:31:47 2006 UTC Modified files: /php-src/ext/standard/tests/array bug38464.phpt /php-src/ext/standard array.c Log: MFB: Fixed bug #38464 (array_count_values() mishandles numeric strings). http://cvs.php.net/viewvc.cgi/php-src/ext/standard/tests/array/bug38464.phpt?r1=1.1&r2=1.2&diff_format=u Index: php-src/ext/standard/tests/array/bug38464.phpt diff -u /dev/null php-src/ext/standard/tests/array/bug38464.phpt:1.2 --- /dev/null Wed Sep 6 17:31:47 2006 +++ php-src/ext/standard/tests/array/bug38464.phpt Wed Sep 6 17:31:46 2006 @@ -0,0 +1,20 @@ +--TEST-- +Bug #38464 (array_count_values() mishandles numeric strings) +--FILE-- + +--EXPECT-- +array(5) { + ["-000"]=> + int(1) + [" 001"]=> + int(1) + [1]=> + int(1) + [" 123"]=> + int(1) + ["+123"]=> + int(1) +} http://cvs.php.net/viewvc.cgi/php-src/ext/standard/array.c?r1=1.382&r2=1.383&diff_format=u Index: php-src/ext/standard/array.c diff -u php-src/ext/standard/array.c:1.382 php-src/ext/standard/array.c:1.383 --- php-src/ext/standard/array.c:1.382 Tue Aug 8 18:06:43 2006 +++ php-src/ext/standard/array.cWed Sep 6 17:31:47 2006 @@ -21,7 +21,7 @@ +--+ */ -/* $Id: array.c,v 1.382 2006/08/08 18:06:43 tony2001 Exp $ */ +/* $Id: array.c,v 1.383 2006/09/06 17:31:47 iliaa Exp $ */ #include "php.h" #include "php_ini.h" @@ -2571,48 +2571,18 @@ (void**)&tmp) == FAILURE) { zval *data; MAKE_STD_ZVAL(data); - Z_TYPE_P(data) = IS_LONG; - Z_LVAL_P(data) = 1; + ZVAL_LONG(data, 1); zend_hash_index_update(Z_ARRVAL_P(return_value), Z_LVAL_PP(entry), &data, sizeof(data), NULL); } else { Z_LVAL_PP(tmp)++; } } else if (Z_TYPE_PP(entry) == IS_STRING || Z_TYPE_PP(entry) == IS_UNICODE) { - /* make sure our array does not end up with numeric string keys -* but don't touch those strings that start with 0 */ - if ((Z_TYPE_PP(entry) == IS_STRING && !(Z_STRLEN_PP(entry) > 1 && Z_STRVAL_PP(entry)[0] == '0') && is_numeric_string(Z_STRVAL_PP(entry), Z_STRLEN_PP(entry), NULL, NULL, 0) == IS_LONG) || - (Z_TYPE_PP(entry) == IS_UNICODE && zend_cmp_unicode_and_literal(Z_USTRVAL_PP(entry), 1, "0", sizeof("0")-1) && is_numeric_unicode(Z_USTRVAL_PP(entry), Z_USTRLEN_PP(entry), NULL, NULL, 0) == IS_LONG)) { - zval tmp_entry; - - tmp_entry = **entry; - zval_copy_ctor(&tmp_entry); - - convert_to_long(&tmp_entry); - - if (zend_hash_index_find(Z_ARRVAL_P(return_value), - Z_LVAL(tmp_entry), - (void**)&tmp) == FAILURE) { - zval *data; - MAKE_STD_ZVAL(data); - Z_TYPE_P(data) = IS_LONG; - Z_LVAL_P(data) = 1; - zend_hash_index_update(Z_ARRVAL_P(return_value), Z_LVAL(tmp_entry), &data, sizeof(data), NULL); - } else { - Z_LVAL_PP(tmp)++; - } - - zval_dtor(&tmp_entry); - zend_hash_move_forward_ex(myht, &pos); - continue; - } - - if (zend_u_hash_find(Z_ARRVAL_P(return_value), Z_TYPE_PP(entry), Z_UNIVAL_PP(entry), Z_UNILEN_PP(entry)+1, (void**)&tmp) == FAILURE) { + if (zend_u_symtable_find(Z_ARRVAL_P(return_value), Z_TYPE_PP(entry), Z_UNIVAL_PP(entry), Z_UNILEN_PP(entry) + 1, (void**)&tmp) == FAILURE) { zval *data; MAKE_STD_ZVAL(data); - Z_TYPE_P(data) = IS_LONG; - Z_LVAL_P(data) = 1; - zend_u_hash_update(Z_ARRVAL_P(return_value), Z_TYPE_PP(entry), Z_UNIVAL_PP(entry), Z_UNILEN_PP(entry) + 1, &data, sizeof(data), NULL); + ZVAL_LONG(data, 1); + zend_u_symtable_update(Z_ARRVAL_P(return_value), Z_TYPE_PP(entry), Z_UNIVAL_PP(
Re: [PHP-CVS] cvs: php-src(PHP_5_2) /ext/pcre php_pcre.c
On Wed, 6 Sep 2006, Nuno Lopes wrote: Derick can you please merge this to the PHP 4.4 branch? I currently don't have a php 4 checkout. The patch is pretty safe. Done Derick Thanks ;) Nuno -- 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/pcre php_pcre.c
On Wed, 6 Sep 2006, Nuno Lopes wrote: > Derick can you please merge this to the PHP 4.4 branch? I currently don't have > a php 4 checkout. The patch is pretty safe. Done Derick -- 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/pcre php_pcre.c
derick Wed Sep 6 17:03:05 2006 UTC Modified files: (Branch: PHP_4_4) /php-src/ext/pcre php_pcre.c Log: - MFH: fix memleak of pcre study data (Patch by Nuno). http://cvs.php.net/viewvc.cgi/php-src/ext/pcre/php_pcre.c?r1=1.132.2.24.2.3&r2=1.132.2.24.2.4&diff_format=u Index: php-src/ext/pcre/php_pcre.c diff -u php-src/ext/pcre/php_pcre.c:1.132.2.24.2.3 php-src/ext/pcre/php_pcre.c:1.132.2.24.2.4 --- php-src/ext/pcre/php_pcre.c:1.132.2.24.2.3 Fri Feb 17 21:18:51 2006 +++ php-src/ext/pcre/php_pcre.c Wed Sep 6 17:03:05 2006 @@ -16,7 +16,7 @@ +--+ */ -/* $Id: php_pcre.c,v 1.132.2.24.2.3 2006/02/17 21:18:51 andrei Exp $ */ +/* $Id: php_pcre.c,v 1.132.2.24.2.4 2006/09/06 17:03:05 derick Exp $ */ #ifdef HAVE_CONFIG_H #include "config.h" @@ -52,6 +52,7 @@ pcre_cache_entry *pce = (pcre_cache_entry *) data; if (!pce) return; pefree(pce->re, 1); + if (pce->extra) pefree(pce->extra, 1); #if HAVE_SETLOCALE if ((void*)pce->tables) pefree((void*)pce->tables, 1); pefree(pce->locale, 1); -- 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/pcre php_pcre.c
Derick can you please merge this to the PHP 4.4 branch? I currently don't have a php 4 checkout. The patch is pretty safe. Nuno - Original Message - nlopess Wed Sep 6 16:30:59 2006 UTC Modified files: (Branch: PHP_5_2) /php-src/ext/pcre php_pcre.c Log: fix memleak of pcre study data http://cvs.php.net/viewvc.cgi/php-src/ext/pcre/php_pcre.c?r1=1.168.2.9.2.10&r2=1.168.2.9.2.11&diff_format=u Index: php-src/ext/pcre/php_pcre.c diff -u php-src/ext/pcre/php_pcre.c:1.168.2.9.2.10 php-src/ext/pcre/php_pcre.c:1.168.2.9.2.11 --- php-src/ext/pcre/php_pcre.c:1.168.2.9.2.10 Wed Aug 30 16:46:59 2006 +++ php-src/ext/pcre/php_pcre.c Wed Sep 6 16:30:59 2006 @@ -16,7 +16,7 @@ +--+ */ -/* $Id: php_pcre.c,v 1.168.2.9.2.10 2006/08/30 16:46:59 tony2001 Exp $ */ +/* $Id: php_pcre.c,v 1.168.2.9.2.11 2006/09/06 16:30:59 nlopess Exp $ */ #ifdef HAVE_CONFIG_H #include "config.h" @@ -90,6 +90,7 @@ pcre_cache_entry *pce = (pcre_cache_entry *) data; if (!pce) return; pefree(pce->re, 1); + if (pce->extra) pefree(pce->extra, 1); #if HAVE_SETLOCALE if ((void*)pce->tables) pefree((void*)pce->tables, 1); pefree(pce->locale, 1); -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-CVS] cvs: php-src /ext/pcre php_pcre.c
nlopess Wed Sep 6 16:31:28 2006 UTC Modified files: /php-src/ext/pcre php_pcre.c Log: MFB: fix memleak of pcre study data http://cvs.php.net/viewvc.cgi/php-src/ext/pcre/php_pcre.c?r1=1.196&r2=1.197&diff_format=u Index: php-src/ext/pcre/php_pcre.c diff -u php-src/ext/pcre/php_pcre.c:1.196 php-src/ext/pcre/php_pcre.c:1.197 --- php-src/ext/pcre/php_pcre.c:1.196 Wed Aug 30 16:46:23 2006 +++ php-src/ext/pcre/php_pcre.c Wed Sep 6 16:31:28 2006 @@ -16,7 +16,7 @@ +--+ */ -/* $Id: php_pcre.c,v 1.196 2006/08/30 16:46:23 tony2001 Exp $ */ +/* $Id: php_pcre.c,v 1.197 2006/09/06 16:31:28 nlopess Exp $ */ /* UTODO * - PCRE_NO_UTF8_CHECK option for Unicode strings @@ -102,6 +102,7 @@ pcre_cache_entry *pce = (pcre_cache_entry *) data; if (!pce) return; pefree(pce->re, 1); + if (pce->extra) pefree(pce->extra, 1); #if HAVE_SETLOCALE if ((void*)pce->tables) pefree((void*)pce->tables, 1); pefree(pce->locale, 1); -- 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/pcre php_pcre.c
nlopess Wed Sep 6 16:30:59 2006 UTC Modified files: (Branch: PHP_5_2) /php-src/ext/pcre php_pcre.c Log: fix memleak of pcre study data http://cvs.php.net/viewvc.cgi/php-src/ext/pcre/php_pcre.c?r1=1.168.2.9.2.10&r2=1.168.2.9.2.11&diff_format=u Index: php-src/ext/pcre/php_pcre.c diff -u php-src/ext/pcre/php_pcre.c:1.168.2.9.2.10 php-src/ext/pcre/php_pcre.c:1.168.2.9.2.11 --- php-src/ext/pcre/php_pcre.c:1.168.2.9.2.10 Wed Aug 30 16:46:59 2006 +++ php-src/ext/pcre/php_pcre.c Wed Sep 6 16:30:59 2006 @@ -16,7 +16,7 @@ +--+ */ -/* $Id: php_pcre.c,v 1.168.2.9.2.10 2006/08/30 16:46:59 tony2001 Exp $ */ +/* $Id: php_pcre.c,v 1.168.2.9.2.11 2006/09/06 16:30:59 nlopess Exp $ */ #ifdef HAVE_CONFIG_H #include "config.h" @@ -90,6 +90,7 @@ pcre_cache_entry *pce = (pcre_cache_entry *) data; if (!pce) return; pefree(pce->re, 1); + if (pce->extra) pefree(pce->extra, 1); #if HAVE_SETLOCALE if ((void*)pce->tables) pefree((void*)pce->tables, 1); pefree(pce->locale, 1); -- 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/mbstring/tests mb_strlen.phpt
tony2001Wed Sep 6 16:30:45 2006 UTC Modified files: (Branch: PHP_4_4) /php-src/ext/mbstring/tests mb_strlen.phpt Log: fix test http://cvs.php.net/viewvc.cgi/php-src/ext/mbstring/tests/mb_strlen.phpt?r1=1.2.2.1.4.1&r2=1.2.2.1.4.2&diff_format=u Index: php-src/ext/mbstring/tests/mb_strlen.phpt diff -u php-src/ext/mbstring/tests/mb_strlen.phpt:1.2.2.1.4.1 php-src/ext/mbstring/tests/mb_strlen.phpt:1.2.2.1.4.2 --- php-src/ext/mbstring/tests/mb_strlen.phpt:1.2.2.1.4.1 Sat Jul 29 17:12:22 2006 +++ php-src/ext/mbstring/tests/mb_strlen.phpt Wed Sep 6 16:30:45 2006 @@ -93,10 +93,6 @@ == WRONG PARAMETERS == ERR: Notice 5 -ERR: Catchable fatal error ERR: Notice 6 ERR: Warning - - - -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-CVS] cvs: php-src /ext/simplexml simplexml.c
nlopess Wed Sep 6 15:32:19 2006 UTC Modified files: /php-src/ext/simplexml simplexml.c Log: MFB http://cvs.php.net/viewvc.cgi/php-src/ext/simplexml/simplexml.c?r1=1.218&r2=1.219&diff_format=u Index: php-src/ext/simplexml/simplexml.c diff -u php-src/ext/simplexml/simplexml.c:1.218 php-src/ext/simplexml/simplexml.c:1.219 --- php-src/ext/simplexml/simplexml.c:1.218 Wed Aug 16 08:51:34 2006 +++ php-src/ext/simplexml/simplexml.c Wed Sep 6 15:32:19 2006 @@ -18,7 +18,7 @@ +--+ */ -/* $Id: simplexml.c,v 1.218 2006/08/16 08:51:34 sebastian Exp $ */ +/* $Id: simplexml.c,v 1.219 2006/09/06 15:32:19 nlopess Exp $ */ #ifdef HAVE_CONFIG_H #include "config.h" @@ -1964,7 +1964,7 @@ { php_sxe_object *sxe = php_sxe_fetch_object(getThis() TSRMLS_CC); char *data, *ns = NULL; - int data_len, *ns_len = 0; + int data_len, ns_len = 0; xmlDocPtr docp; longoptions = 0; zend_bool is_url = 0, isprefix = 0; @@ -2339,7 +2339,7 @@ { php_info_print_table_start(); php_info_print_table_header(2, "Simplexml support", "enabled"); - php_info_print_table_row(2, "Revision", "$Revision: 1.218 $"); + php_info_print_table_row(2, "Revision", "$Revision: 1.219 $"); php_info_print_table_row(2, "Schema support", #ifdef LIBXML_SCHEMAS_ENABLED "enabled"); -- 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/simplexml simplexml.c
nlopess Wed Sep 6 15:31:48 2006 UTC Modified files: (Branch: PHP_5_2) /php-src/ext/simplexml simplexml.c Log: fix one more parameter (int*->int) http://cvs.php.net/viewvc.cgi/php-src/ext/simplexml/simplexml.c?r1=1.151.2.22.2.14&r2=1.151.2.22.2.15&diff_format=u Index: php-src/ext/simplexml/simplexml.c diff -u php-src/ext/simplexml/simplexml.c:1.151.2.22.2.14 php-src/ext/simplexml/simplexml.c:1.151.2.22.2.15 --- php-src/ext/simplexml/simplexml.c:1.151.2.22.2.14 Mon Aug 14 11:57:50 2006 +++ php-src/ext/simplexml/simplexml.c Wed Sep 6 15:31:48 2006 @@ -18,7 +18,7 @@ +--+ */ -/* $Id: simplexml.c,v 1.151.2.22.2.14 2006/08/14 11:57:50 rrichards Exp $ */ +/* $Id: simplexml.c,v 1.151.2.22.2.15 2006/09/06 15:31:48 nlopess Exp $ */ #ifdef HAVE_CONFIG_H #include "config.h" @@ -1976,7 +1976,7 @@ { php_sxe_object *sxe = php_sxe_fetch_object(getThis() TSRMLS_CC); char *data, *ns = NULL; - int data_len, *ns_len = 0; + int data_len, ns_len = 0; xmlDocPtr docp; longoptions = 0; zend_bool is_url = 0, isprefix = 0; @@ -2331,7 +2331,7 @@ { php_info_print_table_start(); php_info_print_table_header(2, "Simplexml support", "enabled"); - php_info_print_table_row(2, "Revision", "$Revision: 1.151.2.22.2.14 $"); + php_info_print_table_row(2, "Revision", "$Revision: 1.151.2.22.2.15 $"); php_info_print_table_row(2, "Schema support", #ifdef LIBXML_SCHEMAS_ENABLED "enabled"); -- 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/zip php_zip.c
nlopess Wed Sep 6 15:19:41 2006 UTC Modified files: (Branch: PHP_5_2) /php-src/ext/zipphp_zip.c Log: MFH zend_parse_parameters() fixes http://cvs.php.net/viewvc.cgi/php-src/ext/zip/php_zip.c?r1=1.1.2.9&r2=1.1.2.10&diff_format=u Index: php-src/ext/zip/php_zip.c diff -u php-src/ext/zip/php_zip.c:1.1.2.9 php-src/ext/zip/php_zip.c:1.1.2.10 --- php-src/ext/zip/php_zip.c:1.1.2.9 Wed Sep 6 13:03:55 2006 +++ php-src/ext/zip/php_zip.c Wed Sep 6 15:19:41 2006 @@ -16,7 +16,7 @@ +--+ */ -/* $Id: php_zip.c,v 1.1.2.9 2006/09/06 13:03:55 pajoye Exp $ */ +/* $Id: php_zip.c,v 1.1.2.10 2006/09/06 15:19:41 nlopess Exp $ */ #ifdef HAVE_CONFIG_H #include "config.h" @@ -1230,7 +1230,7 @@ { struct zip *intern; zval *this = getThis(); - long comment_len = 0; + int comment_len; char * comment; if (!this) { @@ -1283,7 +1283,7 @@ { struct zip *intern; zval *this = getThis(); - long comment_len = 0, name_len = 0; + int comment_len, name_len; char * comment, *name; struct zip_stat sb; @@ -1311,7 +1311,8 @@ { struct zip *intern; zval *this = getThis(); - long index, comment_len = 0; + long index; + int comment_len; char * comment; struct zip_stat sb; @@ -1338,7 +1339,8 @@ { struct zip *intern; zval *this = getThis(); - long name_len = 0, flags = 0; + int name_len; + long flags = 0; int comment_len = 0; const char * comment; char *name; @@ -1428,8 +1430,8 @@ { struct zip *intern; zval *this = getThis(); - long name_len = 0; - char *name; + int name_len; + char *name; struct zip_stat sb; if (!this) { @@ -1981,7 +1983,7 @@ php_info_print_table_start(); php_info_print_table_row(2, "Zip", "enabled"); - php_info_print_table_row(2, "Extension Version","$Id: php_zip.c,v 1.1.2.9 2006/09/06 13:03:55 pajoye Exp $"); + php_info_print_table_row(2, "Extension Version","$Id: php_zip.c,v 1.1.2.10 2006/09/06 15:19:41 nlopess Exp $"); php_info_print_table_row(2, "Zip version", "1.7.1"); php_info_print_table_row(2, "Libzip version", "0.7.1"); -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-CVS] cvs: php-src /ext/zip php_zip.c
nlopess Wed Sep 6 15:13:16 2006 UTC Modified files: /php-src/ext/zipphp_zip.c Log: fix a few more zend_parse_parameters() issues http://cvs.php.net/viewvc.cgi/php-src/ext/zip/php_zip.c?r1=1.10&r2=1.11&diff_format=u Index: php-src/ext/zip/php_zip.c diff -u php-src/ext/zip/php_zip.c:1.10 php-src/ext/zip/php_zip.c:1.11 --- php-src/ext/zip/php_zip.c:1.10 Sat Aug 26 12:29:59 2006 +++ php-src/ext/zip/php_zip.c Wed Sep 6 15:13:16 2006 @@ -16,7 +16,7 @@ +--+ */ -/* $Id: php_zip.c,v 1.10 2006/08/26 12:29:59 pajoye Exp $ */ +/* $Id: php_zip.c,v 1.11 2006/09/06 15:13:16 nlopess Exp $ */ #ifdef HAVE_CONFIG_H #include "config.h" @@ -597,7 +597,7 @@ zip_rsrc *rsrc_int; int err = 0; - if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "s|l", &filename, &filename_len) == FAILURE) { + if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "s", &filename, &filename_len) == FAILURE) { return; } @@ -643,7 +643,7 @@ long flags = 0; zip_rsrc *rsrc_int; - if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "r|l", &zip_dp, flags) == FAILURE) { + if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "r|l", &zip_dp, &flags) == FAILURE) { return; } ZEND_FETCH_RESOURCE(rsrc_int, zip_rsrc *, &zip_dp, -1, le_zip_dir_name, le_zip_dir); @@ -1205,7 +1205,7 @@ { struct zip *intern; zval *this = getThis(); - long comment_len = 0; + int comment_len; char * comment; if (!this) { @@ -1258,7 +1258,7 @@ { struct zip *intern; zval *this = getThis(); - long comment_len = 0, name_len = 0; + int comment_len, name_len; char * comment, *name; struct zip_stat sb; @@ -1286,7 +1286,8 @@ { struct zip *intern; zval *this = getThis(); - long index, comment_len = 0; + long index + int comment_len; char * comment; struct zip_stat sb; @@ -1313,7 +1314,8 @@ { struct zip *intern; zval *this = getThis(); - long name_len = 0, flags = 0; + int name_len; + long flags = 0; int comment_len = 0; const char * comment; char *name; @@ -1403,8 +1405,8 @@ { struct zip *intern; zval *this = getThis(); - long name_len = 0; - char *name; + int name_len; + char *name; struct zip_stat sb; if (!this) { @@ -1956,7 +1958,7 @@ php_info_print_table_start(); php_info_print_table_row(2, "Zip", "enabled"); - php_info_print_table_row(2, "Extension Version","$Id: php_zip.c,v 1.10 2006/08/26 12:29:59 pajoye Exp $"); + php_info_print_table_row(2, "Extension Version","$Id: php_zip.c,v 1.11 2006/09/06 15:13:16 nlopess Exp $"); php_info_print_table_row(2, "Zip version", "1.7.1"); php_info_print_table_row(2, "Libzip version", "0.7.1"); -- 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/zip php_zip.c
pajoye Wed Sep 6 13:03:55 2006 UTC Modified files: (Branch: PHP_5_2) /php-src/ext/zipphp_zip.c Log: - MFH: zip_open takes only one parameter (Thx Nuno L.) http://cvs.php.net/viewvc.cgi/php-src/ext/zip/php_zip.c?r1=1.1.2.8&r2=1.1.2.9&diff_format=u Index: php-src/ext/zip/php_zip.c diff -u php-src/ext/zip/php_zip.c:1.1.2.8 php-src/ext/zip/php_zip.c:1.1.2.9 --- php-src/ext/zip/php_zip.c:1.1.2.8 Sat Aug 26 12:23:43 2006 +++ php-src/ext/zip/php_zip.c Wed Sep 6 13:03:55 2006 @@ -16,7 +16,7 @@ +--+ */ -/* $Id: php_zip.c,v 1.1.2.8 2006/08/26 12:23:43 pajoye Exp $ */ +/* $Id: php_zip.c,v 1.1.2.9 2006/09/06 13:03:55 pajoye Exp $ */ #ifdef HAVE_CONFIG_H #include "config.h" @@ -608,17 +608,16 @@ ZEND_GET_MODULE(zip) #endif -/* {{{ proto resource zip_open(string filename [,flags]) +/* {{{ proto resource zip_open(string filename) Create new zip using source uri for output */ PHP_FUNCTION(zip_open) { char *filename; int filename_len; zip_rsrc *rsrc_int; - long mode = 0; int err = 0; - if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "s|l", &filename, &filename_len, &mode) == FAILURE) { + if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "s", &filename, &filename_len) == FAILURE) { return; } if (SAFEMODE_CHECKFILE(filename)) { @@ -627,7 +626,7 @@ rsrc_int = (zip_rsrc *)emalloc(sizeof(zip_rsrc)); - rsrc_int->za = zip_open(filename, mode, &err); + rsrc_int->za = zip_open(filename, 0, &err); if (rsrc_int->za == NULL) { efree(rsrc_int); RETURN_LONG((long)err); @@ -1982,7 +1981,7 @@ php_info_print_table_start(); php_info_print_table_row(2, "Zip", "enabled"); - php_info_print_table_row(2, "Extension Version","$Id: php_zip.c,v 1.1.2.8 2006/08/26 12:23:43 pajoye Exp $"); + php_info_print_table_row(2, "Extension Version","$Id: php_zip.c,v 1.1.2.9 2006/09/06 13:03:55 pajoye Exp $"); php_info_print_table_row(2, "Zip version", "1.7.1"); php_info_print_table_row(2, "Libzip version", "0.7.1"); -- 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/pgsql pgsql.c
tony2001Wed Sep 6 12:40:57 2006 UTC Modified files: (Branch: PHP_5_2) /php-src/ext/pgsql pgsql.c Log: fix leak in pg_copy_to() when invalid resource was passed http://cvs.php.net/viewvc.cgi/php-src/ext/pgsql/pgsql.c?r1=1.331.2.13.2.3&r2=1.331.2.13.2.4&diff_format=u Index: php-src/ext/pgsql/pgsql.c diff -u php-src/ext/pgsql/pgsql.c:1.331.2.13.2.3 php-src/ext/pgsql/pgsql.c:1.331.2.13.2.4 --- php-src/ext/pgsql/pgsql.c:1.331.2.13.2.3Thu Jun 15 18:33:08 2006 +++ php-src/ext/pgsql/pgsql.c Wed Sep 6 12:40:56 2006 @@ -20,7 +20,7 @@ +--+ */ -/* $Id: pgsql.c,v 1.331.2.13.2.3 2006/06/15 18:33:08 dmitry Exp $ */ +/* $Id: pgsql.c,v 1.331.2.13.2.4 2006/09/06 12:40:56 tony2001 Exp $ */ #include @@ -3309,12 +3309,13 @@ if (!pg_delim) { pg_delim = "\t"; } + + ZEND_FETCH_RESOURCE2(pgsql, PGconn *, &pgsql_link, id, "PostgreSQL link", le_link, le_plink); + if (!pg_null_as) { pg_null_as = safe_estrdup("N"); } - ZEND_FETCH_RESOURCE2(pgsql, PGconn *, &pgsql_link, id, "PostgreSQL link", le_link, le_plink); - query = (char *)emalloc(strlen(query_template) + strlen(table_name) + strlen(pg_null_as) + 1); sprintf(query, "COPY \"%s\" TO STDOUT DELIMITERS '%c' WITH NULL AS '%s'", table_name, *pg_delim, pg_null_as); -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-CVS] cvs: php-src /ext/pgsql pgsql.c
tony2001Wed Sep 6 12:40:47 2006 UTC Modified files: /php-src/ext/pgsql pgsql.c Log: fix leak in pg_copy_to() when invalid resource was passed http://cvs.php.net/viewvc.cgi/php-src/ext/pgsql/pgsql.c?r1=1.352&r2=1.353&diff_format=u Index: php-src/ext/pgsql/pgsql.c diff -u php-src/ext/pgsql/pgsql.c:1.352 php-src/ext/pgsql/pgsql.c:1.353 --- php-src/ext/pgsql/pgsql.c:1.352 Tue Jun 13 13:12:19 2006 +++ php-src/ext/pgsql/pgsql.c Wed Sep 6 12:40:47 2006 @@ -20,7 +20,7 @@ +--+ */ -/* $Id: pgsql.c,v 1.352 2006/06/13 13:12:19 dmitry Exp $ */ +/* $Id: pgsql.c,v 1.353 2006/09/06 12:40:47 tony2001 Exp $ */ #include @@ -3296,12 +3296,13 @@ if (!pg_delim) { pg_delim = "\t"; } + + ZEND_FETCH_RESOURCE2(pgsql, PGconn *, &pgsql_link, id, "PostgreSQL link", le_link, le_plink); + if (!pg_null_as) { pg_null_as = safe_estrdup("N"); } - ZEND_FETCH_RESOURCE2(pgsql, PGconn *, &pgsql_link, id, "PostgreSQL link", le_link, le_plink); - query = (char *)emalloc(strlen(query_template) + strlen(table_name) + strlen(pg_null_as) + 1); sprintf(query, "COPY \"%s\" TO STDOUT DELIMITERS '%c' WITH NULL AS '%s'", table_name, *pg_delim, pg_null_as); -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-CVS] cvs: php-src /sapi/apache php_apache.c /sapi/apache_hooks php_apache.c
nlopess Wed Sep 6 11:55:12 2006 UTC Modified files: /php-src/sapi/apachephp_apache.c /php-src/sapi/apache_hooks php_apache.c Log: MFB: more int->zend_bool conversions http://cvs.php.net/viewvc.cgi/php-src/sapi/apache/php_apache.c?r1=1.96&r2=1.97&diff_format=u Index: php-src/sapi/apache/php_apache.c diff -u php-src/sapi/apache/php_apache.c:1.96 php-src/sapi/apache/php_apache.c:1.97 --- php-src/sapi/apache/php_apache.c:1.96 Tue Jul 25 20:22:28 2006 +++ php-src/sapi/apache/php_apache.cWed Sep 6 11:55:12 2006 @@ -17,7 +17,7 @@ | David Sklar <[EMAIL PROTECTED]> | +--+ */ -/* $Id: php_apache.c,v 1.96 2006/07/25 20:22:28 mike Exp $ */ +/* $Id: php_apache.c,v 1.97 2006/09/06 11:55:12 nlopess Exp $ */ #include "php_apache_http.h" @@ -392,7 +392,8 @@ Set an Apache subprocess_env variable */ PHP_FUNCTION(apache_setenv) { - int var_len, val_len, top=0; + int var_len, val_len; + zend_bool top=0; char *var = NULL, *val = NULL; request_rec *r = (request_rec *) SG(server_context); http://cvs.php.net/viewvc.cgi/php-src/sapi/apache_hooks/php_apache.c?r1=1.25&r2=1.26&diff_format=u Index: php-src/sapi/apache_hooks/php_apache.c diff -u php-src/sapi/apache_hooks/php_apache.c:1.25 php-src/sapi/apache_hooks/php_apache.c:1.26 --- php-src/sapi/apache_hooks/php_apache.c:1.25 Fri Jun 2 19:51:43 2006 +++ php-src/sapi/apache_hooks/php_apache.c Wed Sep 6 11:55:12 2006 @@ -17,7 +17,7 @@ | David Sklar <[EMAIL PROTECTED]> | +--+ */ -/* $Id: php_apache.c,v 1.25 2006/06/02 19:51:43 mike Exp $ */ +/* $Id: php_apache.c,v 1.26 2006/09/06 11:55:12 nlopess Exp $ */ #include "php_apache_http.h" @@ -1795,7 +1795,8 @@ Set an Apache subprocess_env variable */ PHP_FUNCTION(apache_setenv) { - int var_len, val_len, top=0; + int var_len, val_len; + zend_bool top=0; char *var = NULL, *val = NULL; request_rec *r = (request_rec *) SG(server_context); -- 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) /sapi/apache php_apache.c /sapi/apache_hooks php_apache.c
nlopess Wed Sep 6 11:54:29 2006 UTC Modified files: (Branch: PHP_5_2) /php-src/sapi/apachephp_apache.c /php-src/sapi/apache_hooks php_apache.c Log: more int->zend_bool conversions http://cvs.php.net/viewvc.cgi/php-src/sapi/apache/php_apache.c?r1=1.89.2.4&r2=1.89.2.4.2.1&diff_format=u Index: php-src/sapi/apache/php_apache.c diff -u php-src/sapi/apache/php_apache.c:1.89.2.4 php-src/sapi/apache/php_apache.c:1.89.2.4.2.1 --- php-src/sapi/apache/php_apache.c:1.89.2.4 Wed Apr 26 09:31:23 2006 +++ php-src/sapi/apache/php_apache.cWed Sep 6 11:54:28 2006 @@ -17,7 +17,7 @@ | David Sklar <[EMAIL PROTECTED]> | +--+ */ -/* $Id: php_apache.c,v 1.89.2.4 2006/04/26 09:31:23 edink Exp $ */ +/* $Id: php_apache.c,v 1.89.2.4.2.1 2006/09/06 11:54:28 nlopess Exp $ */ #include "php_apache_http.h" @@ -394,7 +394,8 @@ Set an Apache subprocess_env variable */ PHP_FUNCTION(apache_setenv) { - int var_len, val_len, top=0; + int var_len, val_len; + zend_bool top=0; char *var = NULL, *val = NULL; request_rec *r = (request_rec *) SG(server_context); http://cvs.php.net/viewvc.cgi/php-src/sapi/apache_hooks/php_apache.c?r1=1.19.2.3&r2=1.19.2.3.2.1&diff_format=u Index: php-src/sapi/apache_hooks/php_apache.c diff -u php-src/sapi/apache_hooks/php_apache.c:1.19.2.3 php-src/sapi/apache_hooks/php_apache.c:1.19.2.3.2.1 --- php-src/sapi/apache_hooks/php_apache.c:1.19.2.3 Sun Jan 1 12:50:18 2006 +++ php-src/sapi/apache_hooks/php_apache.c Wed Sep 6 11:54:29 2006 @@ -17,7 +17,7 @@ | David Sklar <[EMAIL PROTECTED]> | +--+ */ -/* $Id: php_apache.c,v 1.19.2.3 2006/01/01 12:50:18 sniper Exp $ */ +/* $Id: php_apache.c,v 1.19.2.3.2.1 2006/09/06 11:54:29 nlopess Exp $ */ #include "php_apache_http.h" @@ -1796,7 +1796,8 @@ Set an Apache subprocess_env variable */ PHP_FUNCTION(apache_setenv) { - int var_len, val_len, top=0; + int var_len, val_len; + zend_bool top=0; char *var = NULL, *val = NULL; request_rec *r = (request_rec *) SG(server_context); -- 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/dbase dbf_head.c /ext/dbase/tests 002.phpt
tony2001Wed Sep 6 11:34:43 2006 UTC Added files: (Branch: PHP_5_2) /php-src/ext/dbase/tests002.phpt Modified files: /php-src/ext/dbase dbf_head.c Log: fix leaks & uninitialized vars add test http://cvs.php.net/viewvc.cgi/php-src/ext/dbase/dbf_head.c?r1=1.14.4.1.2.2&r2=1.14.4.1.2.3&diff_format=u Index: php-src/ext/dbase/dbf_head.c diff -u php-src/ext/dbase/dbf_head.c:1.14.4.1.2.2 php-src/ext/dbase/dbf_head.c:1.14.4.1.2.3 --- php-src/ext/dbase/dbf_head.c:1.14.4.1.2.2 Tue Aug 8 15:55:27 2006 +++ php-src/ext/dbase/dbf_head.cWed Sep 6 11:34:43 2006 @@ -26,10 +26,14 @@ if ((dbh = (dbhead_t *)calloc(1, sizeof(dbhead_t))) == NULL) return NULL; - if (lseek(fd, 0, 0) < 0) + if (lseek(fd, 0, 0) < 0) { + free(dbh); return NULL; - if ((ret = read(fd, &dbhead, sizeof(dbhead))) < 0) + } + if ((ret = read(fd, &dbhead, sizeof(dbhead))) <= 0) { + free(dbh); return NULL; + } /* build in core info */ dbh->db_fd = fd; @@ -54,6 +58,7 @@ if (gf_retval < 0) { free_dbf_head(dbh); + free(tdbf); return NULL; } if (gf_retval != 2 ) { @@ -89,7 +94,7 @@ free(cur_f->db_format); } } - + free(dbf); free(dbh); } @@ -119,7 +124,7 @@ if (lseek(fd, 0, 0) < 0) return -1; - if ((ret = write(fd, &dbhead, sizeof(dbhead))) < 0) + if ((ret = write(fd, &dbhead, sizeof(dbhead))) <= 0) return -1; return ret; } @@ -132,7 +137,7 @@ struct dbf_dfield dbfield; int ret; - if ((ret = read(dbh->db_fd, &dbfield, sizeof(dbfield))) < 0) { + if ((ret = read(dbh->db_fd, &dbfield, sizeof(dbfield))) <= 0) { return ret; } @@ -192,7 +197,7 @@ } /* now write it out to disk */ - if ((ret = write(dbh->db_fd, &dbfield, sizeof(dbfield))) < 0) { + if ((ret = write(dbh->db_fd, &dbfield, sizeof(dbfield))) <= 0) { return ret; } return 1; @@ -252,21 +257,14 @@ cp = dp; if ((fd = VCWD_OPEN(cp, o_flags|O_BINARY)) < 0) { - cp = (char *)malloc(MAXPATHLEN); /* So where does this get free()'d? -RL */ - strncpy(cp, dp, MAXPATHLEN-5); strcat(cp, ".dbf"); - if ((fd = VCWD_OPEN(cp, o_flags)) < 0) { - free(cp); - perror("open"); - return NULL; - } + return NULL; } if ((dbh = get_dbf_head(fd)) == NULL) { return NULL; } - dbh->db_name = cp; + dbh->db_cur_rec = 0; - return dbh; } http://cvs.php.net/viewvc.cgi/php-src/ext/dbase/tests/002.phpt?view=markup&rev=1.1 Index: php-src/ext/dbase/tests/002.phpt +++ php-src/ext/dbase/tests/002.phpt --TEST-- dbase_open() tests --SKIPIF-- --FILE-- --EXPECTF-- Warning: dbase_open(): unable to open database %s in %s on line %d bool(false) Warning: dbase_open(): unable to open database %s in %s on line %d bool(false) Warning: dbase_open(): unable to open database %s in %s on line %d bool(false) Warning: dbase_open(): unable to open database %s in %s on line %d bool(false) Warning: dbase_open(): unable to open database in %s on line %d bool(false) int(%d) int(%d) Done -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-CVS] cvs: php-src /ext/dbase dbf_head.c /ext/dbase/tests 002.phpt
tony2001Wed Sep 6 11:34:15 2006 UTC Added files: /php-src/ext/dbase/tests002.phpt Modified files: /php-src/ext/dbase dbf_head.c Log: fix leaks & uninitialized vars add test http://cvs.php.net/viewvc.cgi/php-src/ext/dbase/dbf_head.c?r1=1.17&r2=1.18&diff_format=u Index: php-src/ext/dbase/dbf_head.c diff -u php-src/ext/dbase/dbf_head.c:1.17 php-src/ext/dbase/dbf_head.c:1.18 --- php-src/ext/dbase/dbf_head.c:1.17 Tue Aug 8 15:53:54 2006 +++ php-src/ext/dbase/dbf_head.cWed Sep 6 11:34:15 2006 @@ -26,10 +26,14 @@ if ((dbh = (dbhead_t *)calloc(1, sizeof(dbhead_t))) == NULL) return NULL; - if (lseek(fd, 0, 0) < 0) + if (lseek(fd, 0, 0) < 0) { + free(dbh); return NULL; - if ((ret = read(fd, &dbhead, sizeof(dbhead))) < 0) + } + if ((ret = read(fd, &dbhead, sizeof(dbhead))) <= 0) { + free(dbh); return NULL; + } /* build in core info */ dbh->db_fd = fd; @@ -54,6 +58,7 @@ if (gf_retval < 0) { free_dbf_head(dbh); + free(tdbf); return NULL; } if (gf_retval != 2 ) { @@ -89,7 +94,7 @@ free(cur_f->db_format); } } - + free(dbf); free(dbh); } @@ -119,7 +124,7 @@ if (lseek(fd, 0, 0) < 0) return -1; - if ((ret = write(fd, &dbhead, sizeof(dbhead))) < 0) + if ((ret = write(fd, &dbhead, sizeof(dbhead))) <= 0) return -1; return ret; } @@ -132,7 +137,7 @@ struct dbf_dfield dbfield; int ret; - if ((ret = read(dbh->db_fd, &dbfield, sizeof(dbfield))) < 0) { + if ((ret = read(dbh->db_fd, &dbfield, sizeof(dbfield))) <= 0) { return ret; } @@ -192,7 +197,7 @@ } /* now write it out to disk */ - if ((ret = write(dbh->db_fd, &dbfield, sizeof(dbfield))) < 0) { + if ((ret = write(dbh->db_fd, &dbfield, sizeof(dbfield))) <= 0) { return ret; } return 1; @@ -252,21 +257,14 @@ cp = dp; if ((fd = VCWD_OPEN(cp, o_flags|O_BINARY)) < 0) { - cp = (char *)malloc(MAXPATHLEN); /* So where does this get free()'d? -RL */ - strncpy(cp, dp, MAXPATHLEN-5); strcat(cp, ".dbf"); - if ((fd = VCWD_OPEN(cp, o_flags)) < 0) { - free(cp); - perror("open"); - return NULL; - } + return NULL; } if ((dbh = get_dbf_head(fd)) == NULL) { return NULL; } - dbh->db_name = cp; + dbh->db_cur_rec = 0; - return dbh; } http://cvs.php.net/viewvc.cgi/php-src/ext/dbase/tests/002.phpt?view=markup&rev=1.1 Index: php-src/ext/dbase/tests/002.phpt +++ php-src/ext/dbase/tests/002.phpt --TEST-- dbase_open() tests --SKIPIF-- --FILE-- --EXPECTF-- Warning: dbase_open(): unable to open database %s in %s on line %d bool(false) Warning: dbase_open(): unable to open database %s in %s on line %d bool(false) Warning: dbase_open(): unable to open database %s in %s on line %d bool(false) Warning: dbase_open(): unable to open database %s in %s on line %d bool(false) Warning: dbase_open(): unable to open database in %s on line %d bool(false) int(%d) int(%d) Done -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-CVS] cvs: php-src /ext/soap php_http.c
dmitry Wed Sep 6 11:03:59 2006 UTC Modified files: /php-src/ext/soap php_http.c Log: Fixed support for endpoint's URL without part (Rob) http://cvs.php.net/viewvc.cgi/php-src/ext/soap/php_http.c?r1=1.96&r2=1.97&diff_format=u Index: php-src/ext/soap/php_http.c diff -u php-src/ext/soap/php_http.c:1.96 php-src/ext/soap/php_http.c:1.97 --- php-src/ext/soap/php_http.c:1.96Tue Aug 8 16:59:11 2006 +++ php-src/ext/soap/php_http.c Wed Sep 6 11:03:59 2006 @@ -17,7 +17,7 @@ | Dmitry Stogov <[EMAIL PROTECTED]> | +--+ */ -/* $Id: php_http.c,v 1.96 2006/08/08 16:59:11 tony2001 Exp $ */ +/* $Id: php_http.c,v 1.97 2006/09/06 11:03:59 dmitry Exp $ */ #include "php_soap.h" #include "ext/standard/base64.h" @@ -398,6 +398,8 @@ } if (phpurl->path) { smart_str_appends(&soap_headers, phpurl->path); + } else { + smart_str_appendc(&soap_headers, '/'); } if (phpurl->query) { smart_str_appendc(&soap_headers, '?'); @@ -499,6 +501,8 @@ PHP_MD5Update(&md5ctx, (unsigned char*)"POST:", sizeof("POST:")-1); if (phpurl->path) { PHP_MD5Update(&md5ctx, (unsigned char*)phpurl->path, strlen(phpurl->path)); + } else { + PHP_MD5Update(&md5ctx, (unsigned char*)"/", 1); } if (phpurl->query) { PHP_MD5Update(&md5ctx, (unsigned char*)"?", 1); @@ -548,6 +552,8 @@ smart_str_append_const(&soap_headers, "\", uri=\""); if (phpurl->path) { smart_str_appends(&soap_headers, phpurl->path); + } else { + smart_str_appendc(&soap_headers, '/'); } if (phpurl->query) { smart_str_appendc(&soap_headers, '?'); -- 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/soap php_http.c
dmitry Wed Sep 6 11:03:45 2006 UTC Modified files: (Branch: PHP_5_2) /php-src/ext/soap php_http.c Log: Fixed support for endpoint's URL without part (Rob) http://cvs.php.net/viewvc.cgi/php-src/ext/soap/php_http.c?r1=1.77.2.11.2.2&r2=1.77.2.11.2.3&diff_format=u Index: php-src/ext/soap/php_http.c diff -u php-src/ext/soap/php_http.c:1.77.2.11.2.2 php-src/ext/soap/php_http.c:1.77.2.11.2.3 --- php-src/ext/soap/php_http.c:1.77.2.11.2.2 Tue Jul 11 14:24:18 2006 +++ php-src/ext/soap/php_http.c Wed Sep 6 11:03:45 2006 @@ -17,7 +17,7 @@ | Dmitry Stogov <[EMAIL PROTECTED]> | +--+ */ -/* $Id: php_http.c,v 1.77.2.11.2.2 2006/07/11 14:24:18 dmitry Exp $ */ +/* $Id: php_http.c,v 1.77.2.11.2.3 2006/09/06 11:03:45 dmitry Exp $ */ #include "php_soap.h" #include "ext/standard/base64.h" @@ -401,6 +401,8 @@ } if (phpurl->path) { smart_str_appends(&soap_headers, phpurl->path); + } else { + smart_str_appendc(&soap_headers, '/'); } if (phpurl->query) { smart_str_appendc(&soap_headers, '?'); @@ -518,6 +520,8 @@ PHP_MD5Update(&md5ctx, (unsigned char*)"POST:", sizeof("POST:")-1); if (phpurl->path) { PHP_MD5Update(&md5ctx, (unsigned char*)phpurl->path, strlen(phpurl->path)); + } else { + PHP_MD5Update(&md5ctx, (unsigned char*)"/", 1); } if (phpurl->query) { PHP_MD5Update(&md5ctx, (unsigned char*)"?", 1); @@ -574,7 +578,9 @@ smart_str_append_const(&soap_headers, "\", uri=\""); if (phpurl->path) { smart_str_appends(&soap_headers, phpurl->path); - } + } else { + smart_str_appendc(&soap_headers, '/'); + } if (phpurl->query) { smart_str_appendc(&soap_headers, '?'); smart_str_appends(&soap_headers, phpurl->query); -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php