[PHP-CVS] svn: /php/php-src/ branches/PHP_5_4/NEWS trunk/NEWS
chregu Tue, 12 Jul 2011 06:56:11 + Revision: http://svn.php.net/viewvc?view=revision&revision=313166 Log: Added credentials to XSL NEWS entry Changed paths: U php/php-src/branches/PHP_5_4/NEWS U php/php-src/trunk/NEWS Modified: php/php-src/branches/PHP_5_4/NEWS === --- php/php-src/branches/PHP_5_4/NEWS 2011-07-12 06:50:41 UTC (rev 313165) +++ php/php-src/branches/PHP_5_4/NEWS 2011-07-12 06:56:11 UTC (rev 313166) @@ -240,7 +240,7 @@ - Improved XSL extension: . Added XsltProcessor::setSecurityPrefs($options) and getSecurityPrefs() to define forbidden operations within XSLT stylesheets, default is not to -enable any write operations from XSLT anymore. Bug #54446 +enable write operations from XSLT. Bug #54446 (Chregu, Nicolas Gregoire) - Improved ZLIB extension: . Re-implemented non-file related functionality. (Mike) Modified: php/php-src/trunk/NEWS === --- php/php-src/trunk/NEWS 2011-07-12 06:50:41 UTC (rev 313165) +++ php/php-src/trunk/NEWS 2011-07-12 06:56:11 UTC (rev 313166) @@ -209,7 +209,7 @@ - Improved XSL extension: . Added XsltProcessor::setSecurityPrefs($options) and getSecurityPrefs() to define forbidden operations within XSLT stylesheets, default is not to -enable any write operations from XSLT anymore. Bug #54446 +enable write operations from XSLT. Bug #54446 (Chregu, Nicolas Gregoire) - Improved ZLIB extension: . Re-implemented non-file related functionality. (Mike) -- 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/Zend/zend_builtin_functions.c branches/PHP_5_4/Zend/zend_builtin_functions.c trunk/Zend/zend_builtin_functions.c
stas Tue, 12 Jul 2011 05:20:40 + Revision: http://svn.php.net/viewvc?view=revision&revision=313162 Log: remove warning for is_a() BC Changed paths: U php/php-src/branches/PHP_5_3/Zend/zend_builtin_functions.c U php/php-src/branches/PHP_5_4/Zend/zend_builtin_functions.c U php/php-src/trunk/Zend/zend_builtin_functions.c Modified: php/php-src/branches/PHP_5_3/Zend/zend_builtin_functions.c === --- php/php-src/branches/PHP_5_3/Zend/zend_builtin_functions.c 2011-07-12 04:58:55 UTC (rev 313161) +++ php/php-src/branches/PHP_5_3/Zend/zend_builtin_functions.c 2011-07-12 05:20:40 UTC (rev 313162) @@ -825,7 +825,6 @@ if (Z_TYPE_P(obj) == IS_STRING) { zend_class_entry **the_ce; if (zend_lookup_class(Z_STRVAL_P(obj), Z_STRLEN_P(obj), &the_ce TSRMLS_CC) == FAILURE) { - zend_error(E_WARNING, "Unknown class passed as parameter"); RETURN_FALSE; } instance_ce = *the_ce; Modified: php/php-src/branches/PHP_5_4/Zend/zend_builtin_functions.c === --- php/php-src/branches/PHP_5_4/Zend/zend_builtin_functions.c 2011-07-12 04:58:55 UTC (rev 313161) +++ php/php-src/branches/PHP_5_4/Zend/zend_builtin_functions.c 2011-07-12 05:20:40 UTC (rev 313162) @@ -848,7 +848,6 @@ if (Z_TYPE_P(obj) == IS_STRING) { zend_class_entry **the_ce; if (zend_lookup_class(Z_STRVAL_P(obj), Z_STRLEN_P(obj), &the_ce TSRMLS_CC) == FAILURE) { - zend_error(E_WARNING, "Unknown class passed as parameter"); RETURN_FALSE; } instance_ce = *the_ce; Modified: php/php-src/trunk/Zend/zend_builtin_functions.c === --- php/php-src/trunk/Zend/zend_builtin_functions.c 2011-07-12 04:58:55 UTC (rev 313161) +++ php/php-src/trunk/Zend/zend_builtin_functions.c 2011-07-12 05:20:40 UTC (rev 313162) @@ -848,7 +848,6 @@ if (Z_TYPE_P(obj) == IS_STRING) { zend_class_entry **the_ce; if (zend_lookup_class(Z_STRVAL_P(obj), Z_STRLEN_P(obj), &the_ce TSRMLS_CC) == FAILURE) { - zend_error(E_WARNING, "Unknown class passed as parameter"); RETURN_FALSE; } instance_ce = *the_ce; -- 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_4/sapi/litespeed/lsapilib.c trunk/sapi/litespeed/lsapilib.c
stas Tue, 12 Jul 2011 04:58:55 + Revision: http://svn.php.net/viewvc?view=revision&revision=313161 Log: MF53 Changed paths: U php/php-src/branches/PHP_5_4/sapi/litespeed/lsapilib.c U php/php-src/trunk/sapi/litespeed/lsapilib.c Modified: php/php-src/branches/PHP_5_4/sapi/litespeed/lsapilib.c === --- php/php-src/branches/PHP_5_4/sapi/litespeed/lsapilib.c 2011-07-12 04:58:38 UTC (rev 313160) +++ php/php-src/branches/PHP_5_4/sapi/litespeed/lsapilib.c 2011-07-12 04:58:55 UTC (rev 313161) @@ -1442,7 +1442,7 @@ return -1; } -while( isspace( *p ) ) { +while( isspace( *pBind ) ) { ++pBind; } @@ -1498,7 +1498,7 @@ } port = atoi( pEnd ); -if (( port <= 0 )||( port > 655535 )) { +if (( port <= 0 )||( port > 65535 )) { return -1; } if ( doAddrInfo ) { Modified: php/php-src/trunk/sapi/litespeed/lsapilib.c === --- php/php-src/trunk/sapi/litespeed/lsapilib.c 2011-07-12 04:58:38 UTC (rev 313160) +++ php/php-src/trunk/sapi/litespeed/lsapilib.c 2011-07-12 04:58:55 UTC (rev 313161) @@ -1442,7 +1442,7 @@ return -1; } -while( isspace( *p ) ) { +while( isspace( *pBind ) ) { ++pBind; } @@ -1498,7 +1498,7 @@ } port = atoi( pEnd ); -if (( port <= 0 )||( port > 655535 )) { +if (( port <= 0 )||( port > 65535 )) { return -1; } if ( doAddrInfo ) { -- 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_4/NEWS branches/PHP_5_4/UPGRADING branches/PHP_5_4/ext/xsl/php_xsl.c branches/PHP_5_4/ext/xsl/php_xsl.h branches/PHP_5_4/ext/xsl/xsl_fe.h branches/PHP_5_4/e
chregu Tue, 12 Jul 2011 04:58:38 + Revision: http://svn.php.net/viewvc?view=revision&revision=313160 Log: Added XsltProcessor::setSecurityPrefs($options) and getSecurityPrefs() to define forbidden operations within XSLT stylesheets, default is not to enable any write operations from XSLT anymore. Bug #54446 (second iteration of the code for trunk, first commit for 5.4 branch) Bug: https://bugs.php.net/54446 (To be documented) Arbitrary file creation via libxslt 'output' extension Changed paths: U php/php-src/branches/PHP_5_4/NEWS U php/php-src/branches/PHP_5_4/UPGRADING U php/php-src/branches/PHP_5_4/ext/xsl/php_xsl.c U php/php-src/branches/PHP_5_4/ext/xsl/php_xsl.h U php/php-src/branches/PHP_5_4/ext/xsl/xsl_fe.h U php/php-src/branches/PHP_5_4/ext/xsl/xsltprocessor.c U php/php-src/trunk/ext/xsl/xsltprocessor.c Modified: php/php-src/branches/PHP_5_4/NEWS === --- php/php-src/branches/PHP_5_4/NEWS 2011-07-12 04:50:24 UTC (rev 313159) +++ php/php-src/branches/PHP_5_4/NEWS 2011-07-12 04:58:38 UTC (rev 313160) @@ -237,6 +237,11 @@ . Added SplObjectStorage::getHash() hook. (Etienne) . Added CallbackFilterIterator and RecursiveCallbackFilterIterator. (Arnaud) +- Improved XSL extension: + . Added XsltProcessor::setSecurityPrefs($options) and getSecurityPrefs() to +define forbidden operations within XSLT stylesheets, default is not to +enable any write operations from XSLT anymore. Bug #54446 + - Improved ZLIB extension: . Re-implemented non-file related functionality. (Mike) Modified: php/php-src/branches/PHP_5_4/UPGRADING === --- php/php-src/branches/PHP_5_4/UPGRADING 2011-07-12 04:50:24 UTC (rev 313159) +++ php/php-src/branches/PHP_5_4/UPGRADING 2011-07-12 04:58:38 UTC (rev 313160) @@ -176,6 +176,9 @@ var_export(), and print_r(). - The raw data parameter in openssl_encrypt()/openssl_decrypt() is now an options integer rather than a boolean. A value of true produces the same behaviour. +- Write operations within XSLT (for example with the extension sax:output) are + disabled by default. You can define what is forbidden with the method + XsltProcess::setSecurityPrefs($options) === 5. Changes made to existing methods Modified: php/php-src/branches/PHP_5_4/ext/xsl/php_xsl.c === --- php/php-src/branches/PHP_5_4/ext/xsl/php_xsl.c 2011-07-12 04:50:24 UTC (rev 313159) +++ php/php-src/branches/PHP_5_4/ext/xsl/php_xsl.c 2011-07-12 04:58:38 UTC (rev 313160) @@ -126,6 +126,7 @@ intern->node_list = NULL; intern->doc = NULL; intern->profiling = NULL; + intern->securityPrefs = XSL_SECPREF_WRITE_FILE | XSL_SECPREF_WRITE_NETWORK | XSL_SECPREF_CREATE_DIRECTORY; zend_object_std_init(&intern->std, class_type TSRMLS_CC); object_properties_init(&intern->std, class_type); @@ -166,6 +167,13 @@ REGISTER_LONG_CONSTANT("XSL_CLONE_NEVER",-1, CONST_CS | CONST_PERSISTENT); REGISTER_LONG_CONSTANT("XSL_CLONE_ALWAYS",1, CONST_CS | CONST_PERSISTENT); + REGISTER_LONG_CONSTANT("XSL_SECPREF_NONE", XSL_SECPREF_NONE, CONST_CS | CONST_PERSISTENT); + REGISTER_LONG_CONSTANT("XSL_SECPREF_READ_FILE",XSL_SECPREF_READ_FILE,CONST_CS | CONST_PERSISTENT); + REGISTER_LONG_CONSTANT("XSL_SECPREF_WRITE_FILE", XSL_SECPREF_WRITE_FILE, CONST_CS | CONST_PERSISTENT); + REGISTER_LONG_CONSTANT("XSL_SECPREF_CREATE_DIRECTORY", XSL_SECPREF_CREATE_DIRECTORY, CONST_CS | CONST_PERSISTENT); + REGISTER_LONG_CONSTANT("XSL_SECPREF_READ_NETWORK", XSL_SECPREF_READ_NETWORK, CONST_CS | CONST_PERSISTENT); + REGISTER_LONG_CONSTANT("XSL_SECPREF_WRITE_NETWORK",XSL_SECPREF_WRITE_NETWORK,CONST_CS | CONST_PERSISTENT); + REGISTER_LONG_CONSTANT("LIBXSLT_VERSION", LIBXSLT_VERSION,CONST_CS | CONST_PERSISTENT); REGISTER_STRING_CONSTANT("LIBXSLT_DOTTED_VERSION", LIBXSLT_DOTTED_VERSION, CONST_CS | CONST_PERSISTENT); Modified: php/php-src/branches/PHP_5_4/ext/xsl/php_xsl.h === --- php/php-src/branches/PHP_5_4/ext/xsl/php_xsl.h 2011-07-12 04:50:24 UTC (rev 313159) +++ php/php-src/branches/PHP_5_4/ext/xsl/php_xsl.h 2011-07-12 04:58:38 UTC (rev 313160) @@ -32,6 +32,7 @@ #include #include #include +#include #if HAVE_XSL_EXSLT #include #include @@ -43,6 +44,13 @@ #include #include +#define XSL_SECPREF_NONE 0 +#define XSL_SECPREF_READ_FILE 2 +#define XSL_SECPREF_WRITE_FILE 4 +#define XSL_SECPREF_CREATE_DIRECTORY 8 +#define XSL_SECPREF_READ_NETWORK 16 +#define XSL_SECPREF_WRITE_NETWORK 32 + typedef struct _xsl_object { zend_object std; void *ptr; @@ -55,6 +63,7 @@ HashTable *node_list; php_libxml_node_object *doc; char *profiling; + long s
Re: [PHP-CVS] svn: /php/php-src/ branches/PHP_5_4/NEWS branches/PHP_5_4/ext/standard/basic_functions.c branches/PHP_5_4/ext/standard/head.c trunk/ext/standard/basic_functions.c trunk/ext/standard/head
Hi! On 7/11/11 8:56 PM, Kalle Sommer Nielsen wrote: kalleTue, 12 Jul 2011 03:56:32 + Revision: http://svn.php.net/viewvc?view=revision&revision=313156 Log: Changed http_response_code() to be able to set a response code Are you sure this patch is right and you shouldn't use header_op instead? What happens to http_status_line? headers_op does it differently at least. -- Stanislav Malyshev, Software Architect SugarCRM: http://www.sugarcrm.com/ (408)454-6900 ext. 227 -- 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_4/ext/pcntl/ php_signal.c
stas Tue, 12 Jul 2011 04:50:24 + Revision: http://svn.php.net/viewvc?view=revision&revision=313159 Log: MFH Changed paths: U php/php-src/branches/PHP_5_4/ext/pcntl/php_signal.c Modified: php/php-src/branches/PHP_5_4/ext/pcntl/php_signal.c === --- php/php-src/branches/PHP_5_4/ext/pcntl/php_signal.c 2011-07-12 04:45:38 UTC (rev 313158) +++ php/php-src/branches/PHP_5_4/ext/pcntl/php_signal.c 2011-07-12 04:50:24 UTC (rev 313159) @@ -20,16 +20,18 @@ #include "TSRM.h" #include "php_signal.h" +#include "Zend/zend.h" +#include "Zend/zend_signal.h" /* php_signal using sigaction is derrived from Advanced Programing * in the Unix Environment by W. Richard Stevens p 298. */ Sigfunc *php_signal4(int signo, Sigfunc *func, int restart, int mask_all) { struct sigaction act,oact; - act.sa_handler = func; #ifdef ZEND_SIGNALS TSRMLS_FETCH(); #endif + act.sa_handler = func; if (mask_all) { sigfillset(&act.sa_mask); -- 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_4/sapi/litespeed/lsapi_main.c trunk/sapi/litespeed/lsapi_main.c
stas Tue, 12 Jul 2011 04:45:38 + Revision: http://svn.php.net/viewvc?view=revision&revision=313158 Log: MF53 Changed paths: U php/php-src/branches/PHP_5_4/sapi/litespeed/lsapi_main.c U php/php-src/trunk/sapi/litespeed/lsapi_main.c Modified: php/php-src/branches/PHP_5_4/sapi/litespeed/lsapi_main.c === --- php/php-src/branches/PHP_5_4/sapi/litespeed/lsapi_main.c2011-07-12 04:42:00 UTC (rev 313157) +++ php/php-src/branches/PHP_5_4/sapi/litespeed/lsapi_main.c2011-07-12 04:45:38 UTC (rev 313158) @@ -495,6 +495,7 @@ "implicit_flush", "1", "output_buffering", "0", "max_execution_time", "0", + "max_input_time", "-1", NULL }; Modified: php/php-src/trunk/sapi/litespeed/lsapi_main.c === --- php/php-src/trunk/sapi/litespeed/lsapi_main.c 2011-07-12 04:42:00 UTC (rev 313157) +++ php/php-src/trunk/sapi/litespeed/lsapi_main.c 2011-07-12 04:45:38 UTC (rev 313158) @@ -495,6 +495,7 @@ "implicit_flush", "1", "output_buffering", "0", "max_execution_time", "0", + "max_input_time", "-1", NULL }; -- 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_4/NEWS branches/PHP_5_4/ext/standard/basic_functions.c branches/PHP_5_4/ext/standard/head.c trunk/ext/standard/basic_functions.c trunk/ext/standard/head.c
kalleTue, 12 Jul 2011 03:56:32 + Revision: http://svn.php.net/viewvc?view=revision&revision=313156 Log: Changed http_response_code() to be able to set a response code Changed paths: U php/php-src/branches/PHP_5_4/NEWS U php/php-src/branches/PHP_5_4/ext/standard/basic_functions.c U php/php-src/branches/PHP_5_4/ext/standard/head.c U php/php-src/trunk/ext/standard/basic_functions.c U php/php-src/trunk/ext/standard/head.c Modified: php/php-src/branches/PHP_5_4/NEWS === --- php/php-src/branches/PHP_5_4/NEWS 2011-07-12 01:40:32 UTC (rev 313155) +++ php/php-src/branches/PHP_5_4/NEWS 2011-07-12 03:56:32 UTC (rev 313156) @@ -1,4 +1,4 @@ -PHPNEWS +PHP NEWS ||| ?? ??? 2011, PHP 5.4.0 Alpha 2 - General improvements: @@ -16,6 +16,7 @@ . Lowered default value for Process Manager. FR #54098. (fat) - Improved core functions: + . Changed http_response_code() to be able to set a response code. (Kalle) . Fixed crypt_blowfish handling of 8-bit characters. (Stas) (CVE-2011-2483) . Fixed bug#55084 (Function registered by header_register_callback is called only once per process). (Hannes) Modified: php/php-src/branches/PHP_5_4/ext/standard/basic_functions.c === --- php/php-src/branches/PHP_5_4/ext/standard/basic_functions.c 2011-07-12 01:40:32 UTC (rev 313155) +++ php/php-src/branches/PHP_5_4/ext/standard/basic_functions.c 2011-07-12 03:56:32 UTC (rev 313156) @@ -1481,7 +1481,8 @@ ZEND_BEGIN_ARG_INFO(arginfo_headers_list, 0) ZEND_END_ARG_INFO() -ZEND_BEGIN_ARG_INFO(arginfo_http_response_code, 0) +ZEND_BEGIN_ARG_INFO_EX(arginfo_http_response_code, 0, 0, 0) + ZEND_ARG_INFO(0, response_code) ZEND_END_ARG_INFO() /* }}} */ /* {{{ html.c */ Modified: php/php-src/branches/PHP_5_4/ext/standard/head.c === --- php/php-src/branches/PHP_5_4/ext/standard/head.c2011-07-12 01:40:32 UTC (rev 313155) +++ php/php-src/branches/PHP_5_4/ext/standard/head.c2011-07-12 03:56:32 UTC (rev 313156) @@ -280,14 +280,30 @@ } /* }}} */ -/* {{{ proto long http_response_code() - Returns the current HTTP response code */ +/* {{{ proto long http_response_code([int response_code]) + Sets a response code, or returns the current HTTP response code */ PHP_FUNCTION(http_response_code) { - if (zend_parse_parameters_none() == FAILURE) { + long response_code = 0; + + if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "|l", &response_code) == FAILURE) { return; } + if (response_code) + { + long old_response_code; + + old_response_code = SG(sapi_headers).http_response_code; + SG(sapi_headers).http_response_code = response_code; + + if (old_response_code) { + RETURN_LONG(old_response_code); + } + + RETURN_TRUE; + } + if (!SG(sapi_headers).http_response_code) { RETURN_FALSE; } Modified: php/php-src/trunk/ext/standard/basic_functions.c === --- php/php-src/trunk/ext/standard/basic_functions.c2011-07-12 01:40:32 UTC (rev 313155) +++ php/php-src/trunk/ext/standard/basic_functions.c2011-07-12 03:56:32 UTC (rev 313156) @@ -1483,7 +1483,8 @@ ZEND_BEGIN_ARG_INFO(arginfo_headers_list, 0) ZEND_END_ARG_INFO() -ZEND_BEGIN_ARG_INFO(arginfo_http_response_code, 0) +ZEND_BEGIN_ARG_INFO_EX(arginfo_http_response_code, 0, 0, 0) + ZEND_ARG_INFO(0, response_code) ZEND_END_ARG_INFO() /* }}} */ /* {{{ html.c */ Modified: php/php-src/trunk/ext/standard/head.c === --- php/php-src/trunk/ext/standard/head.c 2011-07-12 01:40:32 UTC (rev 313155) +++ php/php-src/trunk/ext/standard/head.c 2011-07-12 03:56:32 UTC (rev 313156) @@ -280,14 +280,30 @@ } /* }}} */ -/* {{{ proto long http_response_code() - Returns the current HTTP response code */ +/* {{{ proto long http_response_code([int response_code]) + Sets a response code, or returns the current HTTP response code */ PHP_FUNCTION(http_response_code) { - if (zend_parse_parameters_none() == FAILURE) { + long response_code = 0; + + if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "|l", &response_code) == FAILURE) { return; } + if (response_code) + { + long old_response_code; + + old_response_code = SG(sapi_headers).http_response_code; + SG(sapi_headers).h
[PHP-CVS] svn: /SVNROOT/ global_avail
philip Tue, 12 Jul 2011 01:40:32 + Revision: http://svn.php.net/viewvc?view=revision&revision=313155 Log: phpdoc karma for Jonathan Guerin (jguerin) Changed paths: U SVNROOT/global_avail Modified: SVNROOT/global_avail === --- SVNROOT/global_avail 2011-07-11 22:49:34 UTC (rev 313154) +++ SVNROOT/global_avail 2011-07-12 01:40:32 UTC (rev 313155) @@ -47,7 +47,7 @@ # The PHP Documentation Group maintains the documentation and its # translations. -avail|lucas,jmertic,bobby,takagi,gcc,cem,mfp,ansriniv,jsgoupil,mazzanet,frogger,coldocean,fleaslob,torben,lynch,kk,ted,paul,mbritton,bibi,mrobinso,perugini,tzwenny,drews,paulsen,hartmann,leon,jonen,tschuer,tfromm,manuel,danbeck,sli,jmcastagnetto,mohrt,samesch,soneca,ronabop,glace,latoserver,rafael,jcmeloni,chrullrich,mk,troels,mathieu,phaethon,mj,corean,pandach,cycle98,vizvil,regina,cynic,jpm,dams,karoora,pcraft,suvia,zimt,ftfuture,ag315,bbonev,afortaleza,neotron,cg,delrom,jkj,hellekin,kgergely,cnewbill,fuzzy74,bjoern,fams,smasiello,dim,lucasr,cpereira,ernani,theseer,noribsd,subjective,ufux,hadar_p,asautins,dbenson,aleczapka,tom,amiller,cortesi,rarruda,betz,alindeman,thyla,cucinato,zyprexia,tpug,mitja,conni,sts,nmav,subbie,leszek,spheroid,slawek,alan_dangelo,ae,nohn,kaser01,visualmind,kurtz,luk,tronic,moh,gerzson,webler,spooky,cece,daniel,boo,nhoizey,joerg,hakan,chief977,shlomi,raful,yuval,tomer,barak,ido,mork,lior,gal,adiju,cr_depend,florian,kappu,muricaru,dt,critix,ck,costra,fancao0515,tibee,eriksson,wenz,bs,anderson,matroz,ave,adu,mmeier,wentzel,scaro,aspinei,lmaxcar,manuzhai,darvina,peter,maxim,romakhin,n0nick,attila,sagi,kai,microbrain,rhheo,shimi,djworld,emil,lboshell,netholic,dmitry83,progcom,verdana,yincheng,surfmax,nicos,bbd,cyril,gregory,hudzilla,klean,mignoni,wiesemann,xqi,mersal,zruya,sean,staybyte,aber_sabeel,alzahrani,thomaslio,jippie,antonio,ahxiao,akcakayaa,allhibi,aner,black,class007,digo,dima,dorons,eshare,hpop1,itay,juppie,mrmatrix,saad,thomasgm,xbite,tobsn,jome,analytik,outsider,heymarcel,asmodean,bader,elmaystro,sp,truelight,gnuhacker,_batman_,sachat,dallas,dejan,zer0fill,steve3d,lm92,bradmssw,tahani,victor,erica,simonh,phpman,mrphp,notarius,joseph,mmkhajah,mohammed,proton,klootz,takashima,leoca,ahmad,abobader,fboudot,wurm,hakawy,felix,ahmedss,mahrous2020,yorgo,gal_ga,abodive,ama,andras,hassen,jkhdk,okamura,popov,xman,fernandoc,avenger,hwin,tix,alrehawi_,liuming,ramysaweres,astone,shiflett,jaenecke,bdensley,adamchan,jingfs,murphy,potatotsang,the_q,jsheets,xelis,equerci,phpcatala,tofanini,umut,kriga,ray,royhuggins,logician,almanar,alexws,gonik,haiaw,lkwang_cn,shadowwulf,telecart,pongsakorn,naveed,shivas,tularis,angela,decorj,hitcho,kevinkee,nmee,thx1140,crotalus,didou,novotnyr,sil,traduim,gui,mgf,ivanr,michal,tsirman,momo,cysoft,firefox,kouber,mipac,muslem,tomysk,vemarkov,garth,lord_lele,stone,laacz,retnug,ernestyang,hatem,house,luisdaniel,nizar,nvivo,seth,tomh,danguer,adam,nio,wassago,beeven,colacino,zvaranka,cesarguru,chubu,dark2907,portoban,reven,wizzard,sywr,koendw83,rylin,webstudio,jsjohnst,dmanusset,et,pitiphan,mbr,cdalar,alrashoudi,hafid,enough,zhouhao007,jnorbi,lorenzohgh,denisr,coder03,jcclaros,thomas,freeman,rioter,jschultz,davey,belleto,jtacon,yuw,elfyn,noam,nathan,salman,cheezy,ene,rezaiqbal,purnomo,dufiga_php,ftp_geo,udhien,prio,luckyguy354,maf,handi,meme,satiri,maddankara,rildo,hd,ali,lpj,adhitama,engkongs,preilly,dave,marcelo,curt,fd,javi,mrmaster,fa,vrana,apaxx,pjotrik,marduk,narcotia1234,enloma,trizo,xmadda,redshift,alifikri,coder,dodol_maniac,eflorin,adywarna,kyokpae,milans,lovchy,spermwhale,phaze,baoengb,derek,yannick,daan,xxiengb,ott,mg,kennyt,tomsommer,poz,zamolxe,bishmila,ph1,irchtml,rogamer,bortolini,sapfir,guru,ahmed,robinhood,sohli,amt,romain,hlecuanda,thessoro,nforbes,jolan,laze,bagilevi,young,shakaali,chokobo,portalufpa,teecee,blindman,holst,schst,mnv,sodhi,aidan,jellybob,lauer,shenkong,jad,robert,peterhuewe,ogre,techtonik,narigone,realtebo,krid,mclay,dasch,miwaniec,abdshomad,sammywg,aeoris,mez,jed,hsc,luckec,dmytton,choudesh,phpvcn,simp,michael,grantc,atex,katja,sthulbourn,mikl,kevinsz,roast,tessus,gavinfo,rant,ramsey,arkadius,erinet,omar,oliver,rquadling,timo,shadda,joeaccord,ezyang,ljbuesch,knut,asonge,ron,nicobn,jacques,void,mcbrown,simionea,preinheimer,stanprog,msaraujo,asbjornit,philippe,sezer,rmlr,hradtke,alan,danielc,danbrown,alexxed,psalehpoor,loudi,abedford,morgue,nilgun,saltybeagle,dedemorton,eniac2008,jawed,ch,mgdm,ericstewart,mager,keito,juxecl,chx,vito,beverloo,joris,mumumu,brandon,santiago,ajcollison,rbowen,ruslany,satoruyoshida,seld,degeberg,yago,seros,dtajchreber,jwage,ambrish,shein,frozenfire,x1v4nx,carlos,nikola,baijh,nullw0rm,danielb,thijs,orientalcoder,sh_mashaqi,dominis,irfan,dre,marionunes,ditto,mirry,superb,moacir,itanea,vitali,duodraco,craigkitterman,mfonda,nbpoole,ircmaxell,nikic,kassner,lyma,gmsecrieru,cyberline,avb,chunsong|phpdoc,phd,web/doc,web/doc-editor +avail|lucas,jmertic,bob
[PHP-CVS] svn: /php/php-src/branches/PHP_5_4/ NEWS
stas Mon, 11 Jul 2011 22:49:34 + Revision: http://svn.php.net/viewvc?view=revision&revision=313154 Log: split changes between alphas Changed paths: U php/php-src/branches/PHP_5_4/NEWS Modified: php/php-src/branches/PHP_5_4/NEWS === --- php/php-src/branches/PHP_5_4/NEWS 2011-07-11 21:56:25 UTC (rev 313153) +++ php/php-src/branches/PHP_5_4/NEWS 2011-07-11 22:49:34 UTC (rev 313154) @@ -1,6 +1,33 @@ -PHP NEWS +PHPNEWS ||| -?? ??? 2011, PHP 5.4.0 +?? ??? 2011, PHP 5.4.0 Alpha 2 +- General improvements: + . Zend Signal Handling. (Lucas Nealan,Arnaud Le Blanc,Brian Shire, Ilia) + +- Improved Zend Engine + . Improved parse error messages. (Felipe) + +- Improved CLI SAPI: + . Added built-in web server that is intended for testing purpose. +(Moriyoshi) + +- Improved PHP-FPM SAPI: + . Added partial syslog support (on error_log only). FR #52052. (fat) + . Lowered default value for Process Manager. FR #54098. (fat) + +- Improved core functions: + . Fixed crypt_blowfish handling of 8-bit characters. (Stas) (CVE-2011-2483) + . Fixed bug#55084 (Function registered by header_register_callback is +called only once per process). (Hannes) + +- Improved DOM extension: + . Added the ability to pass options to loadHTML (Chregu, fxmulder at gmail dot com) + +- OpenSSL extension: + . Use php's implementation for Windows Crypto API in +openssl_random_pseudo_bytes. (Pierre) + +20 Jun 2011, PHP 5.4.0 Alpha 1 - autoconf 2.59+ is now supported (and required) for generating the configure script with ./buildconf. Autoconf 2.60+ is desirable otherwise the configure help order may be incorrect. (Rasmus, Chris Jones) @@ -34,7 +61,6 @@ - -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-CVS] svn: /SVNROOT/ global_avail
bjoriMon, 11 Jul 2011 20:05:57 + Revision: http://svn.php.net/viewvc?view=revision&revision=313151 Log: Give stewart master karma Changed paths: U SVNROOT/global_avail Modified: SVNROOT/global_avail === --- SVNROOT/global_avail2011-07-11 19:49:33 UTC (rev 313150) +++ SVNROOT/global_avail2011-07-11 20:05:57 UTC (rev 313151) @@ -59,7 +59,8 @@ avail|ericstewart|web/php/*/archive avail|odoucet|web/php-news/,web/qa/ avail|shein|web/php-news/ -avail|stewartlord,dragoonis,seld|web/php/ +avail|dragoonis,seld|web/php/ +avail|stewartlord|web/php/,web/php-master/ # The PHP Presentation Group has access to the presentations on the # conf.php.net site. -- 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/main/reentrancy.c branches/PHP_5_4/main/reentrancy.c trunk/main/reentrancy.c
iliaaMon, 11 Jul 2011 17:01:23 + Revision: http://svn.php.net/viewvc?view=revision&revision=313144 Log: Fixed bug #55014 (Compile failure due to improper use of ctime_r()). Bug: https://bugs.php.net/55014 (Open) Error Compiling: too many arguments to function `ctime_r' Changed paths: U php/php-src/branches/PHP_5_3/NEWS U php/php-src/branches/PHP_5_3/main/reentrancy.c U php/php-src/branches/PHP_5_4/main/reentrancy.c U php/php-src/trunk/main/reentrancy.c Modified: php/php-src/branches/PHP_5_3/NEWS === --- php/php-src/branches/PHP_5_3/NEWS 2011-07-11 17:00:04 UTC (rev 313143) +++ php/php-src/branches/PHP_5_3/NEWS 2011-07-11 17:01:23 UTC (rev 313144) @@ -6,6 +6,7 @@ though the class has none). (Felipe) - Core + . Fixed bug #55014 (Compile failure due to improper use of ctime_r()). (Ilia) . Fixed bug #54332 (Crash in zend_mm_check_ptr // Heap corruption). (Dmitry) . Fixed bug #54305 (Crash in gc_remove_zval_from_buffer). (Dmitry) . Fixed bug #53727 (Inconsistent behavior of is_subclass_of with interfaces) Modified: php/php-src/branches/PHP_5_3/main/reentrancy.c === --- php/php-src/branches/PHP_5_3/main/reentrancy.c 2011-07-11 17:00:04 UTC (rev 313143) +++ php/php-src/branches/PHP_5_3/main/reentrancy.c 2011-07-11 17:01:23 UTC (rev 313144) @@ -60,14 +60,14 @@ PHPAPI char *php_ctime_r(const time_t *clock, char *buf) { - if (ctime_r(clock, buf, 26) == buf) + if (ctime_r(clock, buf) == buf) return (buf); return (NULL); } PHPAPI char *php_asctime_r(const struct tm *tm, char *buf) { - if (asctime_r(tm, buf, 26) == buf) + if (asctime_r(tm, buf) == buf) return (buf); return (NULL); } Modified: php/php-src/branches/PHP_5_4/main/reentrancy.c === --- php/php-src/branches/PHP_5_4/main/reentrancy.c 2011-07-11 17:00:04 UTC (rev 313143) +++ php/php-src/branches/PHP_5_4/main/reentrancy.c 2011-07-11 17:01:23 UTC (rev 313144) @@ -60,14 +60,14 @@ PHPAPI char *php_ctime_r(const time_t *clock, char *buf) { - if (ctime_r(clock, buf, 26) == buf) + if (ctime_r(clock, buf) == buf) return (buf); return (NULL); } PHPAPI char *php_asctime_r(const struct tm *tm, char *buf) { - if (asctime_r(tm, buf, 26) == buf) + if (asctime_r(tm, buf) == buf) return (buf); return (NULL); } Modified: php/php-src/trunk/main/reentrancy.c === --- php/php-src/trunk/main/reentrancy.c 2011-07-11 17:00:04 UTC (rev 313143) +++ php/php-src/trunk/main/reentrancy.c 2011-07-11 17:01:23 UTC (rev 313144) @@ -60,14 +60,14 @@ PHPAPI char *php_ctime_r(const time_t *clock, char *buf) { - if (ctime_r(clock, buf, 26) == buf) + if (ctime_r(clock, buf) == buf) return (buf); return (NULL); } PHPAPI char *php_asctime_r(const struct tm *tm, char *buf) { - if (asctime_r(tm, buf, 26) == buf) + if (asctime_r(tm, buf) == buf) return (buf); return (NULL); } -- 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_4/ NEWS ext/dom/document.c ext/libxml/libxml.c
chregu Mon, 11 Jul 2011 15:18:46 + Revision: http://svn.php.net/viewvc?view=revision&revision=313135 Log: Added the ability to pass options to loadHTML (Chregu, fxmulder at gmail dot com) (MFT - Merged from Trunk) Changed paths: U php/php-src/branches/PHP_5_4/NEWS U php/php-src/branches/PHP_5_4/ext/dom/document.c U php/php-src/branches/PHP_5_4/ext/libxml/libxml.c Modified: php/php-src/branches/PHP_5_4/NEWS === --- php/php-src/branches/PHP_5_4/NEWS 2011-07-11 15:15:57 UTC (rev 313134) +++ php/php-src/branches/PHP_5_4/NEWS 2011-07-11 15:18:46 UTC (rev 313135) @@ -156,6 +156,9 @@ . Added Tokyo Cabinet abstract DB support. (Michael Maclean) . Added Berkeley DB 5 support. (Johannes, Chris Jones) +- Improved DOM extension: + . Added the ability to pass options to loadHTML (Chregu, fxmulder at gmail dot com) + - Improved filesystem functions: . scandir() now accepts SCANDIR_SORT_NONE as a possible sorting_order value. FR #53407. (Adam) Modified: php/php-src/branches/PHP_5_4/ext/dom/document.c === --- php/php-src/branches/PHP_5_4/ext/dom/document.c 2011-07-11 15:15:57 UTC (rev 313134) +++ php/php-src/branches/PHP_5_4/ext/dom/document.c 2011-07-11 15:18:46 UTC (rev 313135) @@ -149,10 +149,12 @@ ZEND_BEGIN_ARG_INFO_EX(arginfo_dom_document_loadhtml, 0, 0, 1) ZEND_ARG_INFO(0, source) + ZEND_ARG_INFO(0, options) ZEND_END_ARG_INFO(); ZEND_BEGIN_ARG_INFO_EX(arginfo_dom_document_loadhtmlfile, 0, 0, 1) ZEND_ARG_INFO(0, source) + ZEND_ARG_INFO(0, options) ZEND_END_ARG_INFO(); ZEND_BEGIN_ARG_INFO_EX(arginfo_dom_document_savehtml, 0, 0, 0) @@ -2155,12 +2157,12 @@ dom_object *intern; dom_doc_propsptr doc_prop; char *source; - int source_len, refcount, ret; + int source_len, refcount, ret, options = 0; htmlParserCtxtPtr ctxt; id = getThis(); - if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "s", &source, &source_len) == FAILURE) { + if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "s|l", &source, &source_len, &options) == FAILURE) { return; } @@ -2180,6 +2182,10 @@ RETURN_FALSE; } + if (options) { + htmlCtxtUseOptions(ctxt, options); + } + ctxt->vctxt.error = php_libxml_ctx_error; ctxt->vctxt.warning = php_libxml_ctx_warning; if (ctxt->sax != NULL) { Modified: php/php-src/branches/PHP_5_4/ext/libxml/libxml.c === --- php/php-src/branches/PHP_5_4/ext/libxml/libxml.c2011-07-11 15:15:57 UTC (rev 313134) +++ php/php-src/branches/PHP_5_4/ext/libxml/libxml.c2011-07-11 15:18:46 UTC (rev 313135) @@ -618,6 +618,7 @@ REGISTER_LONG_CONSTANT("LIBXML_NSCLEAN",XML_PARSE_NSCLEAN, CONST_CS | CONST_PERSISTENT); REGISTER_LONG_CONSTANT("LIBXML_NOCDATA",XML_PARSE_NOCDATA, CONST_CS | CONST_PERSISTENT); REGISTER_LONG_CONSTANT("LIBXML_NONET", XML_PARSE_NONET, CONST_CS | CONST_PERSISTENT); + REGISTER_LONG_CONSTANT("LIBXML_PEDANTIC", XML_PARSE_PEDANTIC, CONST_CS | CONST_PERSISTENT); #if LIBXML_VERSION >= 20621 REGISTER_LONG_CONSTANT("LIBXML_COMPACT",XML_PARSE_COMPACT, CONST_CS | CONST_PERSISTENT); REGISTER_LONG_CONSTANT("LIBXML_NOXMLDECL", XML_SAVE_NO_DECL, CONST_CS | CONST_PERSISTENT); @@ -627,6 +628,15 @@ #endif REGISTER_LONG_CONSTANT("LIBXML_NOEMPTYTAG", LIBXML_SAVE_NOEMPTYTAG, CONST_CS | CONST_PERSISTENT); + /* Additional constants for use with loading html */ +#if LIBXML_VERSION >= 20707 + REGISTER_LONG_CONSTANT("LIBXML_HTML_NOIMPLIED", HTML_PARSE_NOIMPLIED, CONST_CS | CONST_PERSISTENT); +#endif + +#if LIBXML_VERSION >= 20708 + REGISTER_LONG_CONSTANT("LIBXML_HTML_NODEFDTD", HTML_PARSE_NODEFDTD, CONST_CS | CONST_PERSISTENT); +#endif + /* Error levels */ REGISTER_LONG_CONSTANT("LIBXML_ERR_NONE", XML_ERR_NONE, CONST_CS | CONST_PERSISTENT); REGISTER_LONG_CONSTANT("LIBXML_ERR_WARNING",XML_ERR_WARNING, CONST_CS | CONST_PERSISTENT); -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-CVS] svn: /php/php-src/trunk/ NEWS ext/dom/document.c ext/libxml/libxml.c
chregu Mon, 11 Jul 2011 15:02:56 + Revision: http://svn.php.net/viewvc?view=revision&revision=313133 Log: Added the ability to pass options to loadHTML (Chregu, fxmulder at gmail dot com) Changed paths: U php/php-src/trunk/NEWS U php/php-src/trunk/ext/dom/document.c U php/php-src/trunk/ext/libxml/libxml.c Modified: php/php-src/trunk/NEWS === --- php/php-src/trunk/NEWS 2011-07-11 12:08:02 UTC (rev 313132) +++ php/php-src/trunk/NEWS 2011-07-11 15:02:56 UTC (rev 313133) @@ -140,6 +140,9 @@ . Added Tokyo Cabinet abstract DB support. (Michael Maclean) . Added Berkeley DB 5 support. (Johannes, Chris Jones) +- Improved DOM extension: + . Added the ability to pass options to loadHTML (Chregu, fxmulder at gmail dot com) + - Improved filesystem functions: . scandir() now accepts SCANDIR_SORT_NONE as a possible sorting_order value. FR #53407. (Adam) Modified: php/php-src/trunk/ext/dom/document.c === --- php/php-src/trunk/ext/dom/document.c2011-07-11 12:08:02 UTC (rev 313132) +++ php/php-src/trunk/ext/dom/document.c2011-07-11 15:02:56 UTC (rev 313133) @@ -149,10 +149,12 @@ ZEND_BEGIN_ARG_INFO_EX(arginfo_dom_document_loadhtml, 0, 0, 1) ZEND_ARG_INFO(0, source) + ZEND_ARG_INFO(0, options) ZEND_END_ARG_INFO(); ZEND_BEGIN_ARG_INFO_EX(arginfo_dom_document_loadhtmlfile, 0, 0, 1) ZEND_ARG_INFO(0, source) + ZEND_ARG_INFO(0, options) ZEND_END_ARG_INFO(); ZEND_BEGIN_ARG_INFO_EX(arginfo_dom_document_savehtml, 0, 0, 0) @@ -2155,12 +2157,12 @@ dom_object *intern; dom_doc_propsptr doc_prop; char *source; - int source_len, refcount, ret; + int source_len, refcount, ret, options = 0; htmlParserCtxtPtr ctxt; id = getThis(); - if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "s", &source, &source_len) == FAILURE) { + if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "s|l", &source, &source_len, &options) == FAILURE) { return; } @@ -2180,6 +2182,10 @@ RETURN_FALSE; } + if (options) { + htmlCtxtUseOptions(ctxt, options); + } + ctxt->vctxt.error = php_libxml_ctx_error; ctxt->vctxt.warning = php_libxml_ctx_warning; if (ctxt->sax != NULL) { Modified: php/php-src/trunk/ext/libxml/libxml.c === --- php/php-src/trunk/ext/libxml/libxml.c 2011-07-11 12:08:02 UTC (rev 313132) +++ php/php-src/trunk/ext/libxml/libxml.c 2011-07-11 15:02:56 UTC (rev 313133) @@ -618,6 +618,7 @@ REGISTER_LONG_CONSTANT("LIBXML_NSCLEAN",XML_PARSE_NSCLEAN, CONST_CS | CONST_PERSISTENT); REGISTER_LONG_CONSTANT("LIBXML_NOCDATA",XML_PARSE_NOCDATA, CONST_CS | CONST_PERSISTENT); REGISTER_LONG_CONSTANT("LIBXML_NONET", XML_PARSE_NONET, CONST_CS | CONST_PERSISTENT); + REGISTER_LONG_CONSTANT("LIBXML_PEDANTIC", XML_PARSE_PEDANTIC, CONST_CS | CONST_PERSISTENT); #if LIBXML_VERSION >= 20621 REGISTER_LONG_CONSTANT("LIBXML_COMPACT",XML_PARSE_COMPACT, CONST_CS | CONST_PERSISTENT); REGISTER_LONG_CONSTANT("LIBXML_NOXMLDECL", XML_SAVE_NO_DECL, CONST_CS | CONST_PERSISTENT); @@ -627,6 +628,15 @@ #endif REGISTER_LONG_CONSTANT("LIBXML_NOEMPTYTAG", LIBXML_SAVE_NOEMPTYTAG, CONST_CS | CONST_PERSISTENT); + /* Additional constants for use with loading html */ +#if LIBXML_VERSION >= 20707 + REGISTER_LONG_CONSTANT("LIBXML_HTML_NOIMPLIED", HTML_PARSE_NOIMPLIED, CONST_CS | CONST_PERSISTENT); +#endif + +#if LIBXML_VERSION >= 20708 + REGISTER_LONG_CONSTANT("LIBXML_HTML_NODEFDTD", HTML_PARSE_NODEFDTD, CONST_CS | CONST_PERSISTENT); +#endif + /* Error levels */ REGISTER_LONG_CONSTANT("LIBXML_ERR_NONE", XML_ERR_NONE, CONST_CS | CONST_PERSISTENT); REGISTER_LONG_CONSTANT("LIBXML_ERR_WARNING",XML_ERR_WARNING, CONST_CS | CONST_PERSISTENT); -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP-CVS] svn: /php/php-src/trunk/ NEWS UPGRADING ext/xsl/php_xsl.c ext/xsl/php_xsl.h ext/xsl/xsl_fe.h ext/xsl/xsltprocessor.c
Hi I fixed all the things mentioned by Hanned, but my C and PHP-src skills are a little bit rusty, so could anyone have a quick look at my latest patch and check if that's ok/better? https://gist.github.com/7cc9a6263401cd87367f (if you prefer the whole file, it's here https://gist.github.com/55d957fc3265699b7d17 ) thanks chregu On 11.07.11 13:29, Hannes Magnusson wrote: > On Mon, Jul 11, 2011 at 13:16, Christian Stocker wrote: >> chregu Mon, 11 Jul 2011 11:16:22 + >> >> Revision: http://svn.php.net/viewvc?view=revision&revision=313131 >> >> Log: >> Added XsltProcessor::setSecurityPrefs($options) and getSecurityPrefs() >> to define forbidden operations within XSLT stylesheets, default is not to >> enable any write operations from XSLT anymore. Bug #54446 >> > > > Any reason not to merge it to 5.4? > > + if (zend_parse_parameters_ex(ZEND_PARSE_PARAMS_QUIET, > ZEND_NUM_ARGS() TSRMLS_CC, "l", &securityPrefs) == SUCCESS) { > [..] > + } else { > + WRONG_PARAM_COUNT; > + } > > Thats a freaky way of doing if (zend_parse_parameter(...) == FAILURE) > { return; } ... > and won't produce as good errormsg. > > > + php_error_docref(NULL TSRMLS_CC, E_WARNING, "Can't set > libxslt > security properties"); > > Can be printed out up to 5 times in a row.. shouldn't it say which > property it was trying to set? And if one of these calls fail, won't > they all fail? > > > -Hannes -- Liip AG // Feldstrasse 133 // CH-8004 Zurich Tel +41 43 500 39 81 // Mobile +41 76 561 88 60 www.liip.ch // blog.liip.ch // GnuPG 0x0748D5FE -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP-CVS] svn: /php/php-src/trunk/ NEWS UPGRADING ext/xsl/php_xsl.c ext/xsl/php_xsl.h ext/xsl/xsl_fe.h ext/xsl/xsltprocessor.c
On 11.07.11 13:29, Hannes Magnusson wrote: > On Mon, Jul 11, 2011 at 13:16, Christian Stocker wrote: >> chregu Mon, 11 Jul 2011 11:16:22 + >> >> Revision: http://svn.php.net/viewvc?view=revision&revision=313131 >> >> Log: >> Added XsltProcessor::setSecurityPrefs($options) and getSecurityPrefs() >> to define forbidden operations within XSLT stylesheets, default is not to >> enable any write operations from XSLT anymore. Bug #54446 >> > > > Any reason not to merge it to 5.4? Sure, didn't realise that it was already branched. > > + if (zend_parse_parameters_ex(ZEND_PARSE_PARAMS_QUIET, > ZEND_NUM_ARGS() TSRMLS_CC, "l", &securityPrefs) == SUCCESS) { > [..] > + } else { > + WRONG_PARAM_COUNT; > + } > > Thats a freaky way of doing if (zend_parse_parameter(...) == FAILURE) > { return; } ... > and won't produce as good errormsg. copy&paste ;) I'll fix it. > + php_error_docref(NULL TSRMLS_CC, E_WARNING, "Can't set > libxslt > security properties"); > > Can be printed out up to 5 times in a row.. shouldn't it say which > property it was trying to set? And if one of these calls fail, won't > they all fail? yes, not sure how it can fail at all, but again, I'll try to come up with a better solution. Thanks for the feedback, much appreciated chregu > > > -Hannes -- Liip AG // Feldstrasse 133 // CH-8004 Zurich Tel +41 43 500 39 81 // Mobile +41 76 561 88 60 www.liip.ch // blog.liip.ch // GnuPG 0x0748D5FE -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP-CVS] svn: /php/php-src/trunk/ NEWS UPGRADING ext/xsl/php_xsl.c ext/xsl/php_xsl.h ext/xsl/xsl_fe.h ext/xsl/xsltprocessor.c
On Mon, Jul 11, 2011 at 13:16, Christian Stocker wrote: > chregu Mon, 11 Jul 2011 11:16:22 + > > Revision: http://svn.php.net/viewvc?view=revision&revision=313131 > > Log: > Added XsltProcessor::setSecurityPrefs($options) and getSecurityPrefs() > to define forbidden operations within XSLT stylesheets, default is not to > enable any write operations from XSLT anymore. Bug #54446 > Any reason not to merge it to 5.4? + if (zend_parse_parameters_ex(ZEND_PARSE_PARAMS_QUIET, ZEND_NUM_ARGS() TSRMLS_CC, "l", &securityPrefs) == SUCCESS) { [..] + } else { + WRONG_PARAM_COUNT; + } Thats a freaky way of doing if (zend_parse_parameter(...) == FAILURE) { return; } ... and won't produce as good errormsg. + php_error_docref(NULL TSRMLS_CC, E_WARNING, "Can't set libxslt security properties"); Can be printed out up to 5 times in a row.. shouldn't it say which property it was trying to set? And if one of these calls fail, won't they all fail? -Hannes -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-CVS] svn: /php/php-src/trunk/ NEWS UPGRADING ext/xsl/php_xsl.c ext/xsl/php_xsl.h ext/xsl/xsl_fe.h ext/xsl/xsltprocessor.c
chregu Mon, 11 Jul 2011 11:16:22 + Revision: http://svn.php.net/viewvc?view=revision&revision=313131 Log: Added XsltProcessor::setSecurityPrefs($options) and getSecurityPrefs() to define forbidden operations within XSLT stylesheets, default is not to enable any write operations from XSLT anymore. Bug #54446 Bug: https://bugs.php.net/54446 (error getting bug information) Changed paths: U php/php-src/trunk/NEWS U php/php-src/trunk/UPGRADING U php/php-src/trunk/ext/xsl/php_xsl.c U php/php-src/trunk/ext/xsl/php_xsl.h U php/php-src/trunk/ext/xsl/xsl_fe.h U php/php-src/trunk/ext/xsl/xsltprocessor.c Modified: php/php-src/trunk/NEWS === --- php/php-src/trunk/NEWS 2011-07-11 11:10:09 UTC (rev 313130) +++ php/php-src/trunk/NEWS 2011-07-11 11:16:22 UTC (rev 313131) @@ -203,6 +203,11 @@ . Added SplObjectStorage::getHash() hook. (Etienne) . Added CallbackFilterIterator and RecursiveCallbackFilterIterator (Arnaud) +- Improved XSL extension: + . Added XsltProcessor::setSecurityPrefs($options) and getSecurityPrefs() to +define forbidden operations within XSLT stylesheets, default is not to +enable any write operations from XSLT anymore. Bug #54446 + - Improved ZLIB extension: . Re-implemented non-file related functionality. (Mike) Modified: php/php-src/trunk/UPGRADING === --- php/php-src/trunk/UPGRADING 2011-07-11 11:10:09 UTC (rev 313130) +++ php/php-src/trunk/UPGRADING 2011-07-11 11:16:22 UTC (rev 313131) @@ -174,6 +174,9 @@ just the first matching node. - All SimpleXMLElement children are now always printed when using var_dump(), var_export(), and print_r(). +- Write operations within XSLT (for example with the extension sax:output) are + disabled by default. You can define what is forbidden with the method + XsltProcess::setSecurityPrefs($options) === 5. Changes made to existing methods Modified: php/php-src/trunk/ext/xsl/php_xsl.c === --- php/php-src/trunk/ext/xsl/php_xsl.c 2011-07-11 11:10:09 UTC (rev 313130) +++ php/php-src/trunk/ext/xsl/php_xsl.c 2011-07-11 11:16:22 UTC (rev 313131) @@ -126,6 +126,7 @@ intern->node_list = NULL; intern->doc = NULL; intern->profiling = NULL; + intern->securityPrefs = XSL_SECPREF_WRITE_FILE | XSL_SECPREF_WRITE_NETWORK | XSL_SECPREF_CREATE_DIRECTORY; zend_object_std_init(&intern->std, class_type TSRMLS_CC); object_properties_init(&intern->std, class_type); @@ -166,6 +167,13 @@ REGISTER_LONG_CONSTANT("XSL_CLONE_NEVER",-1, CONST_CS | CONST_PERSISTENT); REGISTER_LONG_CONSTANT("XSL_CLONE_ALWAYS",1, CONST_CS | CONST_PERSISTENT); + REGISTER_LONG_CONSTANT("XSL_SECPREF_NONE", XSL_SECPREF_NONE, CONST_CS | CONST_PERSISTENT); + REGISTER_LONG_CONSTANT("XSL_SECPREF_READ_FILE",XSL_SECPREF_READ_FILE,CONST_CS | CONST_PERSISTENT); + REGISTER_LONG_CONSTANT("XSL_SECPREF_WRITE_FILE", XSL_SECPREF_WRITE_FILE, CONST_CS | CONST_PERSISTENT); + REGISTER_LONG_CONSTANT("XSL_SECPREF_CREATE_DIRECTORY", XSL_SECPREF_CREATE_DIRECTORY, CONST_CS | CONST_PERSISTENT); + REGISTER_LONG_CONSTANT("XSL_SECPREF_READ_NETWORK", XSL_SECPREF_READ_NETWORK, CONST_CS | CONST_PERSISTENT); + REGISTER_LONG_CONSTANT("XSL_SECPREF_WRITE_NETWORK",XSL_SECPREF_WRITE_NETWORK,CONST_CS | CONST_PERSISTENT); + REGISTER_LONG_CONSTANT("LIBXSLT_VERSION", LIBXSLT_VERSION,CONST_CS | CONST_PERSISTENT); REGISTER_STRING_CONSTANT("LIBXSLT_DOTTED_VERSION", LIBXSLT_DOTTED_VERSION, CONST_CS | CONST_PERSISTENT); Modified: php/php-src/trunk/ext/xsl/php_xsl.h === --- php/php-src/trunk/ext/xsl/php_xsl.h 2011-07-11 11:10:09 UTC (rev 313130) +++ php/php-src/trunk/ext/xsl/php_xsl.h 2011-07-11 11:16:22 UTC (rev 313131) @@ -32,6 +32,7 @@ #include #include #include +#include #if HAVE_XSL_EXSLT #include #include @@ -43,6 +44,13 @@ #include #include +#define XSL_SECPREF_NONE 0 +#define XSL_SECPREF_READ_FILE 2 +#define XSL_SECPREF_WRITE_FILE 4 +#define XSL_SECPREF_CREATE_DIRECTORY 8 +#define XSL_SECPREF_READ_NETWORK 16 +#define XSL_SECPREF_WRITE_NETWORK 32 + typedef struct _xsl_object { zend_object std; void *ptr; @@ -55,6 +63,7 @@ HashTable *node_list; php_libxml_node_object *doc; char *profiling; + long securityPrefs; } xsl_object; void php_xsl_set_object(zval *wrapper, void *obj TSRMLS_DC); Modified: php/php-src/trunk/ext/xsl/xsl_fe.h === --- php/php-src/trunk/ext/xsl/xsl_fe.h 2011-07-11 11:10:09 UTC (rev 313130) +++ php/php-src/trunk/ext/xsl/xsl_fe.h 2011-07-11 11:16:22 UTC (rev 313131) @@ -34,6 +34,9 @@ PHP_FUNCTION(xsl_xsltprocessor_has_e
[PHP-CVS] svn: /php/php-src/ branches/PHP_5_3/NEWS branches/PHP_5_3/Zend/tests/bug54305.phpt branches/PHP_5_3/Zend/zend_vm_def.h branches/PHP_5_3/Zend/zend_vm_execute.h branches/PHP_5_4/Zend/tests/bug
dmitry Mon, 11 Jul 2011 10:31:49 + Revision: http://svn.php.net/viewvc?view=revision&revision=313129 Log: Fixed bug #54305 (Crash in gc_remove_zval_from_buffer) Bug: https://bugs.php.net/54305 (error getting bug information) Changed paths: U php/php-src/branches/PHP_5_3/NEWS A php/php-src/branches/PHP_5_3/Zend/tests/bug54305.phpt U php/php-src/branches/PHP_5_3/Zend/zend_vm_def.h U php/php-src/branches/PHP_5_3/Zend/zend_vm_execute.h A php/php-src/branches/PHP_5_4/Zend/tests/bug54305.phpt U php/php-src/branches/PHP_5_4/Zend/zend_vm_def.h U php/php-src/branches/PHP_5_4/Zend/zend_vm_execute.h A php/php-src/trunk/Zend/tests/bug54305.phpt U php/php-src/trunk/Zend/zend_vm_def.h U php/php-src/trunk/Zend/zend_vm_execute.h Modified: php/php-src/branches/PHP_5_3/NEWS === --- php/php-src/branches/PHP_5_3/NEWS 2011-07-11 10:29:44 UTC (rev 313128) +++ php/php-src/branches/PHP_5_3/NEWS 2011-07-11 10:31:49 UTC (rev 313129) @@ -7,6 +7,7 @@ - Core . Fixed bug #54332 (Crash in zend_mm_check_ptr // Heap corruption). (Dmitry) + . Fixed bug #54305 (Crash in gc_remove_zval_from_buffer). (Dmitry) . Fixed bug #53727 (Inconsistent behavior of is_subclass_of with interfaces) (Ralph Schindler, Dmitry) . Fixed buffer overflow on overlog salt in crypt(). (Clément LECIGNE, Stas) Added: php/php-src/branches/PHP_5_3/Zend/tests/bug54305.phpt === --- php/php-src/branches/PHP_5_3/Zend/tests/bug54305.phpt (rev 0) +++ php/php-src/branches/PHP_5_3/Zend/tests/bug54305.phpt 2011-07-11 10:31:49 UTC (rev 313129) @@ -0,0 +1,22 @@ +--TEST-- +Bug #54305 (Crash in gc_remove_zval_from_buffer) +--FILE-- + +--EXPECTF-- +Method [ public method methodWithArgs ] { + @@ %sbug54305.php %d - %d + + - Parameters [2] { +Parameter #0 [ $a ] +Parameter #1 [ $b ] + } +} Modified: php/php-src/branches/PHP_5_3/Zend/zend_vm_def.h === --- php/php-src/branches/PHP_5_3/Zend/zend_vm_def.h 2011-07-11 10:29:44 UTC (rev 313128) +++ php/php-src/branches/PHP_5_3/Zend/zend_vm_def.h 2011-07-11 10:31:49 UTC (rev 313129) @@ -900,10 +900,16 @@ zval *z = GET_OP1_ZVAL_PTR(BP_VAR_R); if (OP1_TYPE != IS_CONST && - Z_TYPE_P(z) == IS_OBJECT && Z_OBJ_HT_P(z)->get_method != NULL && - zend_std_cast_object_tostring(z, &z_copy, IS_STRING TSRMLS_CC) == SUCCESS) { - zend_print_variable(&z_copy); - zval_dtor(&z_copy); + Z_TYPE_P(z) == IS_OBJECT && Z_OBJ_HT_P(z)->get_method != NULL) { + if (OP1_TYPE == IS_TMP_VAR) { + INIT_PZVAL(z); + } + if (zend_std_cast_object_tostring(z, &z_copy, IS_STRING TSRMLS_CC) == SUCCESS) { + zend_print_variable(&z_copy); + zval_dtor(&z_copy); + } else { + zend_print_variable(z); + } } else { zend_print_variable(z); } Modified: php/php-src/branches/PHP_5_3/Zend/zend_vm_execute.h === --- php/php-src/branches/PHP_5_3/Zend/zend_vm_execute.h 2011-07-11 10:29:44 UTC (rev 313128) +++ php/php-src/branches/PHP_5_3/Zend/zend_vm_execute.h 2011-07-11 10:31:49 UTC (rev 313129) @@ -1324,10 +1324,16 @@ zval *z = &opline->op1.u.constant; if (IS_CONST != IS_CONST && - Z_TYPE_P(z) == IS_OBJECT && Z_OBJ_HT_P(z)->get_method != NULL && - zend_std_cast_object_tostring(z, &z_copy, IS_STRING TSRMLS_CC) == SUCCESS) { - zend_print_variable(&z_copy); - zval_dtor(&z_copy); + Z_TYPE_P(z) == IS_OBJECT && Z_OBJ_HT_P(z)->get_method != NULL) { + if (IS_CONST == IS_TMP_VAR) { + INIT_PZVAL(z); + } + if (zend_std_cast_object_tostring(z, &z_copy, IS_STRING TSRMLS_CC) == SUCCESS) { + zend_print_variable(&z_copy); + zval_dtor(&z_copy); + } else { + zend_print_variable(z); + } } else { zend_print_variable(z); } @@ -4614,10 +4620,16 @@ zval *z = _get_zval_ptr_tmp(&opline->op1, EX(Ts), &free_op1 TSRMLS_CC); if (IS_TMP_VAR != IS_CONST && - Z_TYPE_P(z) == IS_OBJECT && Z_OBJ_HT_P(z)->get_method != NULL && - zend_std_cast_object_tostring(z, &z_copy, IS_STRING TSRMLS_CC) == SUCCESS) { - zend_print_variable(&z_copy); - zval_dtor(&z_copy); + Z_TYPE_P(z) == IS_OBJECT && Z_OBJ_HT_P(z)->get_method != NULL) { + if (IS_TMP_VAR == IS_TMP_VAR) { + INIT_PZVAL(z); + } + if (zend_std_cast_object_tostring(z, &z_copy, IS_STRING TSRMLS_CC) == SUCCESS) { + zend_print_variable(&z_copy); + zval_dtor(&z_copy); + } else { + zend_print_variable(z); + } } else { zend_print_variable(z); } @@ -7870,10 +7882,16 @@ zval *z = _get_zval_ptr_var(&opline->op1, EX(Ts), &free_op1 TSRMLS_CC); if (IS_VAR != IS_CONST && - Z_TYPE_P(z) == IS_OBJECT && Z_OBJ_HT_P(z)->get_method != NULL && - zend_std_cast_object_tostring(z, &z_copy, IS_STRING TSRMLS_CC) == SUCCESS) { - zend_print_variable(&z_cop
[PHP-CVS] svn: /php/php-src/ branches/PHP_5_3/NEWS branches/PHP_5_3/ext/standard/tests/strings/bug54332.phpt branches/PHP_5_3/main/snprintf.c branches/PHP_5_3/main/spprintf.c branches/PHP_5_4/ext/stan
dmitry Mon, 11 Jul 2011 09:47:59 + Revision: http://svn.php.net/viewvc?view=revision&revision=313127 Log: Fixed bug #54332 (Crash in zend_mm_check_ptr // Heap corruption) Bug: https://bugs.php.net/54332 (error getting bug information) Changed paths: U php/php-src/branches/PHP_5_3/NEWS A php/php-src/branches/PHP_5_3/ext/standard/tests/strings/bug54332.phpt U php/php-src/branches/PHP_5_3/main/snprintf.c U php/php-src/branches/PHP_5_3/main/spprintf.c A php/php-src/branches/PHP_5_4/ext/standard/tests/strings/bug54332.phpt U php/php-src/branches/PHP_5_4/main/snprintf.c U php/php-src/branches/PHP_5_4/main/spprintf.c A php/php-src/trunk/ext/standard/tests/strings/bug54332.phpt U php/php-src/trunk/main/snprintf.c U php/php-src/trunk/main/spprintf.c Modified: php/php-src/branches/PHP_5_3/NEWS === --- php/php-src/branches/PHP_5_3/NEWS 2011-07-11 08:29:39 UTC (rev 313126) +++ php/php-src/branches/PHP_5_3/NEWS 2011-07-11 09:47:59 UTC (rev 313127) @@ -6,6 +6,7 @@ though the class has none). (Felipe) - Core + . Fixed bug #54332 (Crash in zend_mm_check_ptr // Heap corruption). (Dmitry) . Fixed bug #53727 (Inconsistent behavior of is_subclass_of with interfaces) (Ralph Schindler, Dmitry) . Fixed buffer overflow on overlog salt in crypt(). (Clément LECIGNE, Stas) Added: php/php-src/branches/PHP_5_3/ext/standard/tests/strings/bug54332.phpt === --- php/php-src/branches/PHP_5_3/ext/standard/tests/strings/bug54332.phpt (rev 0) +++ php/php-src/branches/PHP_5_3/ext/standard/tests/strings/bug54332.phpt 2011-07-11 09:47:59 UTC (rev 313127) @@ -0,0 +1,8 @@ +--TEST-- +Bug #54332 (Crash in zend_mm_check_ptr // Heap corruption) +--FILE-- + +--EXPECT-- +1 000 000 000 000 000 052 504 760 255 204 420 248 704 468 581 108 159 154 915 854 115 511 802 457 988 908 195 786 371 375 080 447 864 043 704 443 832 883 878 176 942 523 235 360 430 575 644 792 184 786 706 982 848 387 200 926 575 803 737 830 233 794 788 090 059 368 953 234 970 799 945 081 119 038 967 640 880 074 652 742 780 142 494 579 258 788 820 056 842 838 115 669 472 196 386 865 459 400 540 16000 Modified: php/php-src/branches/PHP_5_3/main/snprintf.c === --- php/php-src/branches/PHP_5_3/main/snprintf.c 2011-07-11 08:29:39 UTC (rev 313126) +++ php/php-src/branches/PHP_5_3/main/snprintf.c 2011-07-11 09:47:59 UTC (rev 313127) @@ -497,8 +497,11 @@ * NUM_BUF_SIZE is the size of the buffer used for arithmetic conversions * * XXX: this is a magic number; do not decrease it + * Emax = 1023 + * NDIG = 320 + * NUM_BUF_SIZE >= strlen("-") + Emax + strlrn(".") + NDIG + strlen("E+1023") + 1; */ -#define NUM_BUF_SIZE 512 +#define NUM_BUF_SIZE 2048 /* Modified: php/php-src/branch
[PHP-CVS] svn: /php/php-src/ branches/PHP_5_4/ext/sockets/multicast.c trunk/ext/sockets/multicast.c
cataphract Mon, 11 Jul 2011 08:29:39 + Revision: http://svn.php.net/viewvc?view=revision&revision=313126 Log: - Further fix for bug #55111 (compilation failure of ext/sockets in Mac OS X). Bug: https://bugs.php.net/55111 (Feedback) Make fails with --enable-sockets Changed paths: U php/php-src/branches/PHP_5_4/ext/sockets/multicast.c U php/php-src/trunk/ext/sockets/multicast.c Modified: php/php-src/branches/PHP_5_4/ext/sockets/multicast.c === --- php/php-src/branches/PHP_5_4/ext/sockets/multicast.c2011-07-11 07:10:30 UTC (rev 313125) +++ php/php-src/branches/PHP_5_4/ext/sockets/multicast.c2011-07-11 08:29:39 UTC (rev 313126) @@ -423,8 +423,8 @@ #define ifr_ifindex ifr_index #endif +#if defined(SIOCGIFNAME) if_req.ifr_ifindex = if_index; -#if defined(SIOCGIFNAME) if (ioctl(php_sock->bsd_socket, SIOCGIFNAME, &if_req) == -1) { #elif defined(HAVE_IF_INDEXTONAME) if (if_indextoname(if_index, if_req.ifr_name) == NULL) { @@ -503,14 +503,25 @@ if struct sockaddr*)&cur_req->ifr_addr)->sa_family == AF_INET) && (((struct sockaddr_in*)&cur_req->ifr_addr)->sin_addr.s_addr == addr->s_addr)) { +#if defined(SIOCGIFINDEX) if (ioctl(php_sock->bsd_socket, SIOCGIFINDEX, (char*)cur_req) == -1) { +#elif defined(HAVE_IF_NAMETOINDEX) + unsigned index_tmp; + if ((index_tmp = if_nametoindex(cur_req->ifr_name)) == 0) { +#else +#error Neither SIOCGIFINDEX nor if_nametoindex are available +#endif php_error_docref(NULL TSRMLS_CC, E_WARNING, "Error converting interface name to index: error %d", errno); goto err; } else { +#if defined(SIOCGIFINDEX) *if_index = cur_req->ifr_ifindex; +#else + *if_index = index_tmp; +#endif efree(buf); return SUCCESS; } Modified: php/php-src/trunk/ext/sockets/multicast.c === --- php/php-src/trunk/ext/sockets/multicast.c 2011-07-11 07:10:30 UTC (rev 313125) +++ php/php-src/trunk/ext/sockets/multicast.c 2011-07-11 08:29:39 UTC (rev 313126) @@ -423,8 +423,8 @@ #define ifr_ifindex ifr_index #endif +#if defined(SIOCGIFNAME) if_req.ifr_ifindex = if_index; -#if defined(SIOCGIFNAME) if (ioctl(php_sock->bsd_socket, SIOCGIFNAME, &if_req) == -1) { #elif defined(HAVE_IF_INDEXTONAME) if (if_indextoname(if_index, if_req.ifr_name) == NULL) { @@ -503,14 +503,25 @@ if struct sockaddr*)&cur_req->ifr_addr)->sa_family == AF_INET) && (((struct sockaddr_in*)&cur_req->ifr_addr)->sin_addr.s_addr == addr->s_addr)) { +#if defined(SIOCGIFINDEX) if (ioctl(php_sock->bsd_socket, SIOCGIFINDEX, (char*)cur_req) == -1) { +#elif defined(HAVE_IF_NAMETOINDEX) + unsigned index_tmp; + if ((index_tmp = if_nametoindex(cur_req->ifr_name)) == 0) { +#else +#error Neither SIOCGIFINDEX nor if_nametoindex are available +#endif php_error_docref(NULL TSRMLS_CC, E_WARNING, "Error converting interface name to index: error %d", errno); goto err; } else { +#if defined(SIOCGIFINDEX) *if_index = cur_req->ifr_ifindex; +#else + *if_index = index_tmp; +#endif efree(buf); return SUCCESS; } -- 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_4/Zend/zend_compile.c trunk/Zend/zend_compile.c
dmitry Mon, 11 Jul 2011 07:10:30 + Revision: http://svn.php.net/viewvc?view=revision&revision=313125 Log: Fixed bug #55150 (php -a segfaults) Bug: https://bugs.php.net/55150 (Assigned) php -a segfaults Changed paths: U php/php-src/branches/PHP_5_4/Zend/zend_compile.c U php/php-src/trunk/Zend/zend_compile.c Modified: php/php-src/branches/PHP_5_4/Zend/zend_compile.c === --- php/php-src/branches/PHP_5_4/Zend/zend_compile.c2011-07-11 06:32:41 UTC (rev 313124) +++ php/php-src/branches/PHP_5_4/Zend/zend_compile.c2011-07-11 07:10:30 UTC (rev 313125) @@ -70,6 +70,10 @@ #define GET_CACHE_SLOT(literal) do { \ CG(active_op_array)->literals[literal].cache_slot = CG(active_op_array)->last_cache_slot++; \ + if ((CG(active_op_array)->fn_flags & ZEND_ACC_INTERACTIVE) && CG(active_op_array)->run_time_cache) { \ + CG(active_op_array)->run_time_cache = erealloc(CG(active_op_array)->run_time_cache, CG(active_op_array)->last_cache_slot * sizeof(void*)); \ + CG(active_op_array)->run_time_cache[CG(active_op_array)->last_cache_slot - 1] = NULL; \ + } \ } while (0) #define POLYMORPHIC_CACHE_SLOT_SIZE 2 @@ -77,6 +81,11 @@ #define GET_POLYMORPHIC_CACHE_SLOT(literal) do { \ CG(active_op_array)->literals[literal].cache_slot = CG(active_op_array)->last_cache_slot; \ CG(active_op_array)->last_cache_slot += POLYMORPHIC_CACHE_SLOT_SIZE; \ + if ((CG(active_op_array)->fn_flags & ZEND_ACC_INTERACTIVE) && CG(active_op_array)->run_time_cache) { \ + CG(active_op_array)->run_time_cache = erealloc(CG(active_op_array)->run_time_cache, CG(active_op_array)->last_cache_slot * sizeof(void*)); \ + CG(active_op_array)->run_time_cache[CG(active_op_array)->last_cache_slot - 1] = NULL; \ + CG(active_op_array)->run_time_cache[CG(active_op_array)->last_cache_slot - 2] = NULL; \ + } \ } while (0) #define FREE_POLYMORPHIC_CACHE_SLOT(literal) do { \ Modified: php/php-src/trunk/Zend/zend_compile.c === --- php/php-src/trunk/Zend/zend_compile.c 2011-07-11 06:32:41 UTC (rev 313124) +++ php/php-src/trunk/Zend/zend_compile.c 2011-07-11 07:10:30 UTC (rev 313125) @@ -70,6 +70,10 @@ #define GET_CACHE_SLOT(literal) do { \ CG(active_op_array)->literals[literal].cache_slot = CG(active_op_array)->last_cache_slot++; \ + if ((CG(active_op_array)->fn_flags & ZEND_ACC_INTERACTIVE) && CG(active_op_array)->run_time_cache) { \ + CG(active_op_array)->run_time_cache = erealloc(CG(active_op_array)->run_time_cache, CG(active_op_array)->last_cache_slot * sizeof(void*)); \ + CG(active_op_array)->run_time_cache[CG(active_op_array)->last_cache_slot - 1] = NULL; \ + } \ } while (0) #define POLYMORPHIC_CACHE_SLOT_SIZE 2 @@ -77,6 +81,11 @@ #define GET_POLYMORPHIC_CACHE_SLOT(literal) do { \ CG(active_op_array)->literals[literal].cache_slot = CG(active_op_array)->last_cache_slot; \ CG(active_op_array)->last_cache_slot += POLYMORPHIC_CACHE_SLOT_SIZE; \ + if ((CG(active_op_array)->fn_flags & ZEND_ACC_INTERACTIVE) && CG(active_op_array)->run_time_cache) { \ + CG(active_op_array)->run_time_cache = erealloc(CG(active_op_array)->run_time_cache, CG(active_op_array)->last_cache_slot * sizeof(void*)); \ + CG(active_op_array)->run_time_cache[CG(active_op_array)->last_cache_slot - 1] = NULL; \ + CG(active_op_array)->run_time_cache[CG(active_op_array)->last_cache_slot - 2] = NULL; \ + } \ } while (0) #define FREE_POLYMORPHIC_CACHE_SLOT(literal) do { \ -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php