[PHP-CVS] svn: /php/php-src/ branches/PHP_5_3/ext/mysqlnd/mysqlnd_debug.c branches/PHP_5_3/ext/mysqlnd/mysqlnd_debug.h trunk/ext/mysqlnd/mysqlnd_debug.c trunk/ext/mysqlnd/mysqlnd_debug.h
andrey Mon, 25 Oct 2010 13:44:11 + Revision: http://svn.php.net/viewvc?view=revisionrevision=304846 Log: rename and remove usage of inttypes.h, not needed Changed paths: U php/php-src/branches/PHP_5_3/ext/mysqlnd/mysqlnd_debug.c U php/php-src/branches/PHP_5_3/ext/mysqlnd/mysqlnd_debug.h U php/php-src/trunk/ext/mysqlnd/mysqlnd_debug.c U php/php-src/trunk/ext/mysqlnd/mysqlnd_debug.h Modified: php/php-src/branches/PHP_5_3/ext/mysqlnd/mysqlnd_debug.c === --- php/php-src/branches/PHP_5_3/ext/mysqlnd/mysqlnd_debug.c2010-10-25 13:43:03 UTC (rev 304845) +++ php/php-src/branches/PHP_5_3/ext/mysqlnd/mysqlnd_debug.c2010-10-25 13:44:11 UTC (rev 304846) @@ -27,7 +27,6 @@ #include mysqlnd_wireprotocol.h #include mysqlnd_statistics.h #include zend_builtin_functions.h -#include inttypes.h static const char * const mysqlnd_debug_default_trace_file = /tmp/mysqlnd.trace; Modified: php/php-src/branches/PHP_5_3/ext/mysqlnd/mysqlnd_debug.h === --- php/php-src/branches/PHP_5_3/ext/mysqlnd/mysqlnd_debug.h2010-10-25 13:43:03 UTC (rev 304845) +++ php/php-src/branches/PHP_5_3/ext/mysqlnd/mysqlnd_debug.h2010-10-25 13:44:11 UTC (rev 304846) @@ -66,9 +66,9 @@ #if defined(__GNUC__) || (defined(_MSC_VER) (_MSC_VER = 1400)) #define DBG_PROFILE_TIMEVAL_TO_DOUBLE(tp) ((tp.tv_sec * 100LL)+ tp.tv_usec) -#define DBG_PROFILE_DECLARE_TIMEVARS struct timeval __tp = {0}; uint64_t __start = 0; /* initialization is needed */ -#define DBG_PROFILE_START_TIME() gettimeofday(__tp, NULL); __start = DBG_PROFILE_TIMEVAL_TO_DOUBLE(__tp); -#define DBG_PROFILE_END_TIME(duration) gettimeofday(__tp, NULL); (duration) = (DBG_PROFILE_TIMEVAL_TO_DOUBLE(__tp) - __start); +#define DBG_PROFILE_DECLARE_TIMEVARS struct timeval __dbg_prof_tp = {0}; uint64_t __dbg_prof_start = 0; /* initialization is needed */ +#define DBG_PROFILE_START_TIME() gettimeofday(__dbg_prof_tp, NULL); __dbg_prof_start = DBG_PROFILE_TIMEVAL_TO_DOUBLE(__dbg_prof_tp); +#define DBG_PROFILE_END_TIME(duration) gettimeofday(__dbg_prof_tp, NULL); (duration) = (DBG_PROFILE_TIMEVAL_TO_DOUBLE(__dbg_prof_tp) - __dbg_prof_start); #define DBG_INF_EX(dbg_obj, msg) do { if (dbg_skip_trace == FALSE) (dbg_obj)-m-log((dbg_obj), __LINE__, __FILE__, -1, info : , (msg)); } while (0) #define DBG_ERR_EX(dbg_obj, msg) do { if (dbg_skip_trace == FALSE) (dbg_obj)-m-log((dbg_obj), __LINE__, __FILE__, -1, error: , (msg)); } while (0) Modified: php/php-src/trunk/ext/mysqlnd/mysqlnd_debug.c === --- php/php-src/trunk/ext/mysqlnd/mysqlnd_debug.c 2010-10-25 13:43:03 UTC (rev 304845) +++ php/php-src/trunk/ext/mysqlnd/mysqlnd_debug.c 2010-10-25 13:44:11 UTC (rev 304846) @@ -27,7 +27,6 @@ #include mysqlnd_wireprotocol.h #include mysqlnd_statistics.h #include zend_builtin_functions.h -#include inttypes.h static const char * const mysqlnd_debug_default_trace_file = /tmp/mysqlnd.trace; Modified: php/php-src/trunk/ext/mysqlnd/mysqlnd_debug.h === --- php/php-src/trunk/ext/mysqlnd/mysqlnd_debug.h 2010-10-25 13:43:03 UTC (rev 304845) +++ php/php-src/trunk/ext/mysqlnd/mysqlnd_debug.h 2010-10-25 13:44:11 UTC (rev 304846) @@ -66,9 +66,9 @@ #if defined(__GNUC__) || (defined(_MSC_VER) (_MSC_VER = 1400)) #define DBG_PROFILE_TIMEVAL_TO_DOUBLE(tp) ((tp.tv_sec * 100LL)+ tp.tv_usec) -#define DBG_PROFILE_DECLARE_TIMEVARS struct timeval __tp = {0}; uint64_t __start = 0; /* initialization is needed */ -#define DBG_PROFILE_START_TIME() gettimeofday(__tp, NULL); __start = DBG_PROFILE_TIMEVAL_TO_DOUBLE(__tp); -#define DBG_PROFILE_END_TIME(duration) gettimeofday(__tp, NULL); (duration) = (DBG_PROFILE_TIMEVAL_TO_DOUBLE(__tp) - __start); +#define DBG_PROFILE_DECLARE_TIMEVARS struct timeval __dbg_prof_tp = {0}; uint64_t __dbg_prof_start = 0; /* initialization is needed */ +#define DBG_PROFILE_START_TIME() gettimeofday(__dbg_prof_tp, NULL); __dbg_prof_start = DBG_PROFILE_TIMEVAL_TO_DOUBLE(__dbg_prof_tp); +#define DBG_PROFILE_END_TIME(duration) gettimeofday(__dbg_prof_tp, NULL); (duration) = (DBG_PROFILE_TIMEVAL_TO_DOUBLE(__dbg_prof_tp) - __dbg_prof_start); #define DBG_INF_EX(dbg_obj, msg) do { if (dbg_skip_trace == FALSE) (dbg_obj)-m-log((dbg_obj), __LINE__, __FILE__, -1, info : , (msg)); } while (0) #define DBG_ERR_EX(dbg_obj, msg) do { if (dbg_skip_trace == FALSE) (dbg_obj)-m-log((dbg_obj), __LINE__, __FILE__, -1, error: , (msg)); } while (0) -- 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/gmp/ gmp.c
iliaaMon, 25 Oct 2010 16:38:19 + Revision: http://svn.php.net/viewvc?view=revisionrevision=304881 Log: Removed unused variable Changed paths: U php/php-src/trunk/ext/gmp/gmp.c Modified: php/php-src/trunk/ext/gmp/gmp.c === --- php/php-src/trunk/ext/gmp/gmp.c 2010-10-25 16:12:31 UTC (rev 304880) +++ php/php-src/trunk/ext/gmp/gmp.c 2010-10-25 16:38:19 UTC (rev 304881) @@ -957,12 +957,10 @@ ZEND_FUNCTION(gmp_mod) { zval **a_arg, **b_arg; - zval b_copy; if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, ZZ, a_arg, b_arg) == FAILURE){ return; - } - + } gmp_zval_binary_ui_op_ex(return_value, a_arg, b_arg, mpz_mod, (gmp_binary_ui_op_t)mpz_mod_ui, 1, 1, 0 TSRMLS_CC); } -- 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/standard/ html.c
iliaaMon, 25 Oct 2010 16:46:55 + Revision: http://svn.php.net/viewvc?view=revisionrevision=304882 Log: Code cleanup CS Changed paths: U php/php-src/trunk/ext/standard/html.c Modified: php/php-src/trunk/ext/standard/html.c === --- php/php-src/trunk/ext/standard/html.c 2010-10-25 16:38:19 UTC (rev 304881) +++ php/php-src/trunk/ext/standard/html.c 2010-10-25 16:46:55 UTC (rev 304882) @@ -1307,9 +1307,11 @@ } } - maxlen = 2 * oldlen; - if (maxlen 128) - maxlen = 128; + if (oldlen 64) { + maxlen = 128; + } else { + maxlen = 2 * oldlen; + } replaced = emalloc(maxlen); len = 0; cursor = 0; @@ -1322,8 +1324,9 @@ /* guarantee we have at least 40 bytes to write. * In HTML5, entities may take up to 33 bytes */ - if (len + 40 maxlen) + if (len + 40 maxlen) { replaced = erealloc(replaced, maxlen += 128); + } if (status == FAILURE) { /* invalid MB sequence */ @@ -1335,9 +1338,6 @@ continue; } else { efree(replaced); - if(!PG(display_errors)) { - php_error_docref(NULL TSRMLS_CC, E_WARNING, Invalid multibyte sequence in argument); - } *newlen = 0; return STR_EMPTY_ALLOC(); } -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-CVS] svn: /SVNROOT/ global_avail
philip Mon, 25 Oct 2010 17:48:47 + Revision: http://svn.php.net/viewvc?view=revisionrevision=304884 Log: Changed user conf to shein, and bumped karma to phpdoc/* Changed paths: U SVNROOT/global_avail Modified: SVNROOT/global_avail === --- SVNROOT/global_avail 2010-10-25 17:10:42 UTC (rev 304883) +++ SVNROOT/global_avail 2010-10-25 17:48:47 UTC (rev 304884) @@ -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|phpdoc,phd,web/doc,web/doc-editor
[PHP-CVS] svn: /php/php-src/ branches/PHP_5_3/NEWS branches/PHP_5_3/main/SAPI.c branches/PHP_5_3/tests/basic/req44164.phpt trunk/main/SAPI.c trunk/tests/basic/req44164.phpt
cataphract Tue, 26 Oct 2010 02:16:21 + Revision: http://svn.php.net/viewvc?view=revisionrevision=304903 Log: - Implemented request #44164, zlib.output_compression is now implicitly disabled when the header Content-length is set. #One could argue that any output handler could change the size of the #response, so this exception for zlib.output_compression is an #inconsistency. However, zlib.output_compression is presented as a #performance setting, whose value should have no effect on the #correctness of the scripts. This was not the case. Setting the #header content-length and enabling zlib.output_compression was #a recipe for infringing section 4.4 of RFC 2616. Bug: http://bugs.php.net/44164 (Assigned) Handle Content-Length HTTP header when zlib.output_compression active Changed paths: U php/php-src/branches/PHP_5_3/NEWS U php/php-src/branches/PHP_5_3/main/SAPI.c A php/php-src/branches/PHP_5_3/tests/basic/req44164.phpt U php/php-src/trunk/main/SAPI.c A php/php-src/trunk/tests/basic/req44164.phpt Modified: php/php-src/branches/PHP_5_3/NEWS === --- php/php-src/branches/PHP_5_3/NEWS 2010-10-25 23:46:54 UTC (rev 304902) +++ php/php-src/branches/PHP_5_3/NEWS 2010-10-26 02:16:21 UTC (rev 304903) @@ -17,6 +17,8 @@ for empty uploads and, in debug mode, 0-length uploads. (Gustavo) - Added a 3rd parameter to get_html_translation_table. It now takes a charset hint, like htmlentities et al. (Gustavo) +- Implemented FR #44164, setting the header Content-length implicitly + disables zlib.output_compression. - Fixed NULL pointer dereference in ZipArchive::getArchiveComment. (CVE-2010-3709). (Maksymilian Arciemowicz) Modified: php/php-src/branches/PHP_5_3/main/SAPI.c === --- php/php-src/branches/PHP_5_3/main/SAPI.c2010-10-25 23:46:54 UTC (rev 304902) +++ php/php-src/branches/PHP_5_3/main/SAPI.c2010-10-26 02:16:21 UTC (rev 304903) @@ -657,6 +657,14 @@ } efree(mimetype); SG(sapi_headers).send_default_content_type = 0; + } else if (!STRCASECMP(header_line, Content-Length)) { + /* Script is setting Content-length. The script cannot reasonably +* know the size of the message body after compression, so it's best +* do disable compression altogether. This contributes to making scripts +* portable between setups that have and don't have zlib compression +* enabled globally. See req #44164 */ + zend_alter_ini_entry(zlib.output_compression, sizeof(zlib.output_compression), + 0, sizeof(0) - 1, PHP_INI_USER, PHP_INI_STAGE_RUNTIME); } else if (!STRCASECMP(header_line, Location)) { if ((SG(sapi_headers).http_response_code 300 || SG(sapi_headers).http_response_code 307) Added: php/php-src/branches/PHP_5_3/tests/basic/req44164.phpt === --- php/php-src/branches/PHP_5_3/tests/basic/req44164.phpt (rev 0) +++ php/php-src/branches/PHP_5_3/tests/basic/req44164.phpt 2010-10-26 02:16:21 UTC (rev 304903) @@ -0,0 +1,17 @@ +--TEST-- +Req #44164 (Handle Content-Length HTTP header when zlib.output_compression active) +--SKIPIF-- +?php +if (!function_exists('gzdeflate')) +die(skip zlib extension required); +? +--INI-- +zlib.output_compression=On +--ENV-- +HTTP_ACCEPT_ENCODING=gzip +--FILE-- +?php +header(Content-length: 200); +echo str_repeat(a, 200); +--EXPECT-- + Modified: php/php-src/trunk/main/SAPI.c === --- php/php-src/trunk/main/SAPI.c 2010-10-25 23:46:54 UTC (rev 304902) +++ php/php-src/trunk/main/SAPI.c 2010-10-26 02:16:21 UTC (rev 304903) @@ -706,6 +706,14 @@ } efree(mimetype); SG(sapi_headers).send_default_content_type = 0; + } else if (!STRCASECMP(header_line, Content-Length)) { + /* Script is setting Content-length. The script cannot reasonably +* know the size of the message body after compression, so it's best +* do disable compression altogether. This contributes to making