[PHP-CVS] svn: /php/php-src/ branches/PHP_5_3/win32/readdir.c trunk/win32/readdir.c
pajoye Mon, 10 Jan 2011 08:07:38 + Revision: http://svn.php.net/viewvc?view=revisionrevision=307329 Log: - possible NULL deref Changed paths: U php/php-src/branches/PHP_5_3/win32/readdir.c U php/php-src/trunk/win32/readdir.c Modified: php/php-src/branches/PHP_5_3/win32/readdir.c === --- php/php-src/branches/PHP_5_3/win32/readdir.c2011-01-10 06:21:53 UTC (rev 307328) +++ php/php-src/branches/PHP_5_3/win32/readdir.c2011-01-10 08:07:38 UTC (rev 307329) @@ -33,6 +33,9 @@ } filespec = (char *)malloc(strlen(resolved_path_buff) + 2 + 1); + if (filespec == NULL) { + return NULL; + } strcpy(filespec, resolved_path_buff); index = strlen(filespec) - 1; if (index = 0 (filespec[index] == '/' || @@ -41,6 +44,9 @@ strcat(filespec, \\*); dp = (DIR *) malloc(sizeof(DIR)); + if (dp == NULL) { + return NULL; + } dp-offset = 0; dp-finished = 0; @@ -140,6 +146,10 @@ dp-finished = 0; filespec = (char *)malloc(strlen(dp-dir) + 2 + 1); + if (filespec == NULL) { + return -1; + } + strcpy(filespec, dp-dir); index = strlen(filespec) - 1; if (index = 0 (filespec[index] == '/' || Modified: php/php-src/trunk/win32/readdir.c === --- php/php-src/trunk/win32/readdir.c 2011-01-10 06:21:53 UTC (rev 307328) +++ php/php-src/trunk/win32/readdir.c 2011-01-10 08:07:38 UTC (rev 307329) @@ -33,6 +33,9 @@ } filespec = (char *)malloc(strlen(resolved_path_buff) + 2 + 1); + if (filespec == NULL) { + return NULL; + } strcpy(filespec, resolved_path_buff); index = strlen(filespec) - 1; if (index = 0 (filespec[index] == '/' || @@ -41,6 +44,9 @@ strcat(filespec, \\*); dp = (DIR *) malloc(sizeof(DIR)); + if (dp == NULL) { + return NULL; + } dp-offset = 0; dp-finished = 0; @@ -140,6 +146,10 @@ dp-finished = 0; filespec = (char *)malloc(strlen(dp-dir) + 2 + 1); + if (filespec == NULL) { + return -1; + } + strcpy(filespec, dp-dir); index = strlen(filespec) - 1; if (index = 0 (filespec[index] == '/' || -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP-CVS] svn: /php/php-src/branches/PHP_5_3/ext/standard/ basic_functions.c http.c php_http.h url.h
hi, Yes, it breaks the ABI, please revert this patch. Maybe another implementation by adding a new function could help, but I'm not sure we need that now in 5.3 either. Cheers, On Mon, Jan 10, 2011 at 5:35 AM, Adam Harvey ahar...@php.net wrote: On 8 January 2011 10:34, Rui Hirokawa hirok...@php.net wrote: hirokawa Sat, 08 Jan 2011 02:34:33 + Revision: http://svn.php.net/viewvc?view=revisionrevision=307248 Log: MFH: added an option to http_build_query for RFC-3986 based url-encoding. Somebody should double check me on this, because binary compatibility's not one of my stronger points, but isn't the change to the php_url_encode_hash_ex() definition going to break BC in 5.3? ext/standard/php_http.h is one of the headers we install. Adam -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- Pierre @pierrejoye | http://blog.thepimp.net | http://www.libgd.org -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-CVS] svn: /php/php-src/ branches/PHP_5_3/main/php_ini.c trunk/main/php_ini.c
pajoye Mon, 10 Jan 2011 08:28:47 + Revision: http://svn.php.net/viewvc?view=revisionrevision=307330 Log: - remove local redeclaration Changed paths: U php/php-src/branches/PHP_5_3/main/php_ini.c U php/php-src/trunk/main/php_ini.c Modified: php/php-src/branches/PHP_5_3/main/php_ini.c === --- php/php-src/branches/PHP_5_3/main/php_ini.c 2011-01-10 08:07:38 UTC (rev 307329) +++ php/php-src/branches/PHP_5_3/main/php_ini.c 2011-01-10 08:28:47 UTC (rev 307330) @@ -650,14 +650,14 @@ struct stat sb; char ini_file[MAXPATHLEN]; char *p; - zend_file_handle fh; + zend_file_handle fh2; zend_llist scanned_ini_list; zend_llist_element *element; int l, total_l = 0; if ((ndir = php_scandir(php_ini_scanned_path, namelist, 0, php_alphasort)) 0) { zend_llist_init(scanned_ini_list, sizeof(char *), (llist_dtor_func_t) free_estring, 1); - memset(fh, 0, sizeof(fh)); + memset(fh2, 0, sizeof(fh2)); for (i = 0; i ndir; i++) { @@ -676,11 +676,11 @@ } if (VCWD_STAT(ini_file, sb) == 0) { if (S_ISREG(sb.st_mode)) { - if ((fh.handle.fp = VCWD_FOPEN(ini_file, r))) { - fh.filename = ini_file; - fh.type = ZEND_HANDLE_FP; + if ((fh2.handle.fp = VCWD_FOPEN(ini_file, r))) { + fh2.filename = ini_file; + fh2.type = ZEND_HANDLE_FP; - if (zend_parse_ini_file(fh, 1, ZEND_INI_SCANNER_NORMAL, (zend_ini_parser_cb_t) php_ini_parser_cb, configuration_hash TSRMLS_CC) == SUCCESS) { + if (zend_parse_ini_file(fh2, 1, ZEND_INI_SCANNER_NORMAL, (zend_ini_parser_cb_t) php_ini_parser_cb, configuration_hash TSRMLS_CC) == SUCCESS) { /* Here, add it to the list of ini files read */ l = strlen(ini_file); total_l += l + 2; @@ -819,7 +819,7 @@ */ PHPAPI void php_ini_activate_per_dir_config(char *path, uint path_len TSRMLS_DC) { - zval *tmp; + zval *tmp2; char *ptr; #if PHP_WIN32 @@ -836,8 +836,8 @@ while ((ptr = strchr(ptr, '/')) != NULL) { *ptr = 0; /* Search for source array matching the path from configuration_hash */ - if (zend_hash_find(configuration_hash, path, strlen(path) + 1, (void **) tmp) == SUCCESS) { - php_ini_activate_config(Z_ARRVAL_P(tmp), PHP_INI_SYSTEM, PHP_INI_STAGE_ACTIVATE TSRMLS_CC); + if (zend_hash_find(configuration_hash, path, strlen(path) + 1, (void **) tmp2) == SUCCESS) { + php_ini_activate_config(Z_ARRVAL_P(tmp2), PHP_INI_SYSTEM, PHP_INI_STAGE_ACTIVATE TSRMLS_CC); } *ptr = '/'; ptr++; Modified: php/php-src/trunk/main/php_ini.c === --- php/php-src/trunk/main/php_ini.c2011-01-10 08:07:38 UTC (rev 307329) +++ php/php-src/trunk/main/php_ini.c2011-01-10 08:28:47 UTC (rev 307330) @@ -646,14 +646,14 @@ struct stat sb; char ini_file[MAXPATHLEN]; char *p; - zend_file_handle fh; + zend_file_handle fh2; zend_llist scanned_ini_list; zend_llist_element *element; int l, total_l = 0; if ((ndir = php_scandir(php_ini_scanned_path, namelist, 0, php_alphasort)) 0) { zend_llist_init(scanned_ini_list, sizeof(char *), (llist_dtor_func_t) free_estring, 1); - memset(fh, 0, sizeof(fh)); + memset(fh2, 0, sizeof(fh2)); for (i = 0; i ndir; i++) { @@ -672,11 +672,11 @@ } if (VCWD_STAT(ini_file, sb) == 0) { if (S_ISREG(sb.st_mode)) { - if ((fh.handle.fp = VCWD_FOPEN(ini_file, r))) { - fh.filename = ini_file; -
[PHP-CVS] svn: /SVNROOT/ pear_avail
saltybeagle Mon, 10 Jan 2011 13:04:33 + Revision: http://svn.php.net/viewvc?view=revisionrevision=307337 Log: Temporarily avail pyrus trunk to remove pyrus.phar. The latest is at http://pear2.php.net/pyrus.phar Changed paths: U SVNROOT/pear_avail Modified: SVNROOT/pear_avail === --- SVNROOT/pear_avail 2011-01-10 10:05:46 UTC (rev 307336) +++ SVNROOT/pear_avail 2011-01-10 13:04:33 UTC (rev 307337) @@ -206,7 +206,7 @@ avail|mekras|pear/packages/PHP_CompatInfo # Moved to git http://github.com/pear2 -unavail||pear2/Pyrus/trunk +#unavail||pear2/Pyrus/trunk # But members of the PHP Group get access to everything. # Note: This line MUST be at the end so that it overrides any unavail settings -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-CVS] svn: /SVNROOT/ pear_avail
saltybeagle Mon, 10 Jan 2011 13:07:21 + Revision: http://svn.php.net/viewvc?view=revisionrevision=307339 Log: Unavail pyrus trunk. Development has moved to github. Changed paths: U SVNROOT/pear_avail Modified: SVNROOT/pear_avail === --- SVNROOT/pear_avail 2011-01-10 13:05:41 UTC (rev 307338) +++ SVNROOT/pear_avail 2011-01-10 13:07:21 UTC (rev 307339) @@ -206,7 +206,7 @@ avail|mekras|pear/packages/PHP_CompatInfo # Moved to git http://github.com/pear2 -#unavail||pear2/Pyrus/trunk +unavail||pear2/Pyrus/trunk # But members of the PHP Group get access to everything. # Note: This line MUST be at the end so that it overrides any unavail settings -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-CVS] svn: /php/php-src/ branches/PHP_5_3/ext/mysqlnd/mysqlnd_enum_n_def.h trunk/ext/mysqlnd/mysqlnd_enum_n_def.h
andrey Mon, 10 Jan 2011 15:14:56 + Revision: http://svn.php.net/viewvc?view=revisionrevision=307340 Log: new flag Changed paths: U php/php-src/branches/PHP_5_3/ext/mysqlnd/mysqlnd_enum_n_def.h U php/php-src/trunk/ext/mysqlnd/mysqlnd_enum_n_def.h Modified: php/php-src/branches/PHP_5_3/ext/mysqlnd/mysqlnd_enum_n_def.h === --- php/php-src/branches/PHP_5_3/ext/mysqlnd/mysqlnd_enum_n_def.h 2011-01-10 13:07:21 UTC (rev 307339) +++ php/php-src/branches/PHP_5_3/ext/mysqlnd/mysqlnd_enum_n_def.h 2011-01-10 15:14:56 UTC (rev 307340) @@ -92,6 +92,7 @@ #define CLIENT_MULTI_STATEMENTS(1UL 16) /* Enable/disable multi-stmt support */ #define CLIENT_MULTI_RESULTS (1UL 17) /* Enable/disable multi-results */ #define CLIENT_PS_MULTI_RESULTS(1UL 18) /* Multi-results in PS-protocol */ +#define CLIENT_PLUGIN_AUTH (1UL 19) /* Client supports plugin authentication */ #define CLIENT_SSL_VERIFY_SERVER_CERT (1UL 30) Modified: php/php-src/trunk/ext/mysqlnd/mysqlnd_enum_n_def.h === --- php/php-src/trunk/ext/mysqlnd/mysqlnd_enum_n_def.h 2011-01-10 13:07:21 UTC (rev 307339) +++ php/php-src/trunk/ext/mysqlnd/mysqlnd_enum_n_def.h 2011-01-10 15:14:56 UTC (rev 307340) @@ -92,6 +92,7 @@ #define CLIENT_MULTI_STATEMENTS(1UL 16) /* Enable/disable multi-stmt support */ #define CLIENT_MULTI_RESULTS (1UL 17) /* Enable/disable multi-results */ #define CLIENT_PS_MULTI_RESULTS(1UL 18) /* Multi-results in PS-protocol */ +#define CLIENT_PLUGIN_AUTH (1UL 19) /* Client supports plugin authentication */ #define CLIENT_SSL_VERIFY_SERVER_CERT (1UL 30) -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-CVS] svn: /php/php-src/trunk/ext/mysqlnd/ mysqlnd_plugin.c
andrey Mon, 10 Jan 2011 15:28:52 + Revision: http://svn.php.net/viewvc?view=revisionrevision=307341 Log: plug a leak Changed paths: U php/php-src/trunk/ext/mysqlnd/mysqlnd_plugin.c Modified: php/php-src/trunk/ext/mysqlnd/mysqlnd_plugin.c === --- php/php-src/trunk/ext/mysqlnd/mysqlnd_plugin.c 2011-01-10 15:14:56 UTC (rev 307340) +++ php/php-src/trunk/ext/mysqlnd/mysqlnd_plugin.c 2011-01-10 15:28:52 UTC (rev 307341) @@ -75,11 +75,10 @@ static enum_func_status mysqlnd_example_plugin_end(void * p TSRMLS_DC) { -#if A0 struct st_mysqlnd_typeii_plugin_example * plugin = (struct st_mysqlnd_typeii_plugin_example *) p; -#endif DBG_ENTER(mysqlnd_example_plugin_end); - + mysqlnd_stats_end(plugin-plugin_header.plugin_stats.values); + plugin-plugin_header.plugin_stats.values = NULL; DBG_RETURN(PASS); } /* }}} */ -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-CVS] svn: /php/php-src/ branches/PHP_5_3/NEWS branches/PHP_5_3/ext/readline/readline.c trunk/ext/readline/readline.c
iliaaMon, 10 Jan 2011 18:19:02 + Revision: http://svn.php.net/viewvc?view=revisionrevision=307343 Log: Fixed bug #53630 (Fixed parameter handling inside readline() function). Bug: http://bugs.php.net/53630 (Verified) optional prompt argument is treated as non-optional Changed paths: U php/php-src/branches/PHP_5_3/NEWS U php/php-src/branches/PHP_5_3/ext/readline/readline.c U php/php-src/trunk/ext/readline/readline.c Modified: php/php-src/branches/PHP_5_3/NEWS === --- php/php-src/branches/PHP_5_3/NEWS 2011-01-10 17:34:26 UTC (rev 307342) +++ php/php-src/branches/PHP_5_3/NEWS 2011-01-10 18:19:02 UTC (rev 307343) @@ -76,6 +76,10 @@ - PHP-FPM SAPI: . Fixed bug #53527 (php-fpm --test doesn't set a valuable return value). (fat) +- Readline extension: + . Fixed bug #53630 (Fixed parameter handling inside readline() function). +(jo at feuersee dot de, Ilia) + - SOAP extension: . Fixed possible crash introduced by the NULL poisoning patch. (Mateusz Kocielski, Pierre) Modified: php/php-src/branches/PHP_5_3/ext/readline/readline.c === --- php/php-src/branches/PHP_5_3/ext/readline/readline.c2011-01-10 17:34:26 UTC (rev 307342) +++ php/php-src/branches/PHP_5_3/ext/readline/readline.c2011-01-10 18:19:02 UTC (rev 307343) @@ -196,7 +196,7 @@ int prompt_len; char *result; - if (FAILURE == zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, s!, prompt, prompt_len)) { + if (FAILURE == zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, |s!, prompt, prompt_len)) { RETURN_FALSE; } Modified: php/php-src/trunk/ext/readline/readline.c === --- php/php-src/trunk/ext/readline/readline.c 2011-01-10 17:34:26 UTC (rev 307342) +++ php/php-src/trunk/ext/readline/readline.c 2011-01-10 18:19:02 UTC (rev 307343) @@ -196,7 +196,7 @@ int prompt_len; char *result; - if (FAILURE == zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, s!, prompt, prompt_len)) { + if (FAILURE == zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, |s!, prompt, prompt_len)) { RETURN_FALSE; } -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP-CVS] svn: /php/php-src/ branches/PHP_5_3/NEWS branches/PHP_5_3/ext/readline/readline.c trunk/ext/readline/readline.c
Hi Ilia, What about adding a phpt? Chris On 01/10/2011 10:19 AM, Ilia Alshanetsky wrote: iliaaMon, 10 Jan 2011 18:19:02 + Revision: http://svn.php.net/viewvc?view=revisionrevision=307343 Log: Fixed bug #53630 (Fixed parameter handling inside readline() function). Bug: http://bugs.php.net/53630 (Verified) optional prompt argument is treated as non-optional Changed paths: U php/php-src/branches/PHP_5_3/NEWS U php/php-src/branches/PHP_5_3/ext/readline/readline.c U php/php-src/trunk/ext/readline/readline.c Modified: php/php-src/branches/PHP_5_3/NEWS === --- php/php-src/branches/PHP_5_3/NEWS 2011-01-10 17:34:26 UTC (rev 307342) +++ php/php-src/branches/PHP_5_3/NEWS 2011-01-10 18:19:02 UTC (rev 307343) @@ -76,6 +76,10 @@ - PHP-FPM SAPI: . Fixed bug #53527 (php-fpm --test doesn't set a valuable return value). (fat) +- Readline extension: + . Fixed bug #53630 (Fixed parameter handling inside readline() function). +(jo at feuersee dot de, Ilia) + - SOAP extension: . Fixed possible crash introduced by the NULL poisoning patch. (Mateusz Kocielski, Pierre) Modified: php/php-src/branches/PHP_5_3/ext/readline/readline.c === --- php/php-src/branches/PHP_5_3/ext/readline/readline.c2011-01-10 17:34:26 UTC (rev 307342) +++ php/php-src/branches/PHP_5_3/ext/readline/readline.c2011-01-10 18:19:02 UTC (rev 307343) @@ -196,7 +196,7 @@ int prompt_len; char *result; - if (FAILURE == zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, s!,prompt,prompt_len)) { + if (FAILURE == zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, |s!,prompt,prompt_len)) { RETURN_FALSE; } Modified: php/php-src/trunk/ext/readline/readline.c === --- php/php-src/trunk/ext/readline/readline.c 2011-01-10 17:34:26 UTC (rev 307342) +++ php/php-src/trunk/ext/readline/readline.c 2011-01-10 18:19:02 UTC (rev 307343) @@ -196,7 +196,7 @@ int prompt_len; char *result; - if (FAILURE == zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, s!,prompt,prompt_len)) { + if (FAILURE == zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, |s!,prompt,prompt_len)) { RETURN_FALSE; } -- Email: christopher.jo...@oracle.com Tel: +1 650 506 8630 Blog: http://blogs.oracle.com/opal/ -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-CVS] svn: /php/php-src/trunk/win32/build/ config.w32
pajoye Mon, 10 Jan 2011 21:04:50 + Revision: http://svn.php.net/viewvc?view=revisionrevision=307353 Log: - do not enable analyzer for snapshot Changed paths: U php/php-src/trunk/win32/build/config.w32 Modified: php/php-src/trunk/win32/build/config.w32 === --- php/php-src/trunk/win32/build/config.w322011-01-10 20:04:02 UTC (rev 307352) +++ php/php-src/trunk/win32/build/config.w322011-01-10 21:04:50 UTC (rev 307353) @@ -363,6 +363,7 @@ STDOUT.WriteBlankLines(1); + /* Can we build with IPv6 support? */ ARG_ENABLE(ipv6, Disable IPv6 support (default is turn it on if available), yes); @@ -407,12 +408,12 @@ FSO.CreateFolder(tmp); } -ARG_ENABLE(security-flags, Enable the compiler security flags, yes); +ARG_ENABLE(security-flags, Disable the compiler security flags, yes); if (PHP_SECURITY_FLAGS == yes) { ADD_FLAG(LDFLAGS, /NXCOMPAT /DYNAMICBASE ); } ARG_ENABLE(static-analyze, Enable the VC compiler static analyze, no); -if (PHP_STATIC_ANALYZE == yes) { +if (PHP_STATIC_ANALYZE == yes PHP_SNAPSHOT_BUILD == no) { ADD_FLAG(CFLAGS, /analyze ); } -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php