[PHP-CVS] svn: /php/php-src/ branches/PHP_5_3/sapi/cgi/cgi_main.c branches/PHP_5_4/sapi/cgi/cgi_main.c trunk/sapi/cgi/cgi_main.c
dmitry Thu, 11 Aug 2011 06:38:42 + Revision: http://svn.php.net/viewvc?view=revision&revision=314773 Log: Fixed possible memory leak Changed paths: U php/php-src/branches/PHP_5_3/sapi/cgi/cgi_main.c U php/php-src/branches/PHP_5_4/sapi/cgi/cgi_main.c U php/php-src/trunk/sapi/cgi/cgi_main.c Modified: php/php-src/branches/PHP_5_3/sapi/cgi/cgi_main.c === --- php/php-src/branches/PHP_5_3/sapi/cgi/cgi_main.c2011-08-11 03:11:56 UTC (rev 314772) +++ php/php-src/branches/PHP_5_3/sapi/cgi/cgi_main.c2011-08-11 06:38:42 UTC (rev 314773) @@ -725,7 +725,7 @@ /* Check whether cache entry has expired and rescan if it is */ if (request_time > entry->expires) { - char * real_path; + char *real_path = NULL; int real_path_len; char *s1, *s2; int s_len; @@ -774,6 +774,9 @@ php_parse_user_ini_file(path, PG(user_ini_filename), entry->user_config TSRMLS_CC); } + if (real_path) { + free(real_path); + } entry->expires = request_time + PG(user_ini_cache_ttl); } Modified: php/php-src/branches/PHP_5_4/sapi/cgi/cgi_main.c === --- php/php-src/branches/PHP_5_4/sapi/cgi/cgi_main.c2011-08-11 03:11:56 UTC (rev 314772) +++ php/php-src/branches/PHP_5_4/sapi/cgi/cgi_main.c2011-08-11 06:38:42 UTC (rev 314773) @@ -761,7 +761,7 @@ /* Check whether cache entry has expired and rescan if it is */ if (request_time > entry->expires) { - char * real_path; + char *real_path = NULL; int real_path_len; char *s1, *s2; int s_len; @@ -809,6 +809,9 @@ php_parse_user_ini_file(path, PG(user_ini_filename), entry->user_config TSRMLS_CC); } + if (real_path) { + free(real_path); + } entry->expires = request_time + PG(user_ini_cache_ttl); } Modified: php/php-src/trunk/sapi/cgi/cgi_main.c === --- php/php-src/trunk/sapi/cgi/cgi_main.c 2011-08-11 03:11:56 UTC (rev 314772) +++ php/php-src/trunk/sapi/cgi/cgi_main.c 2011-08-11 06:38:42 UTC (rev 314773) @@ -761,7 +761,7 @@ /* Check whether cache entry has expired and rescan if it is */ if (request_time > entry->expires) { - char * real_path; + char *real_path = NULL; int real_path_len; char *s1, *s2; int s_len; @@ -809,6 +809,9 @@ php_parse_user_ini_file(path, PG(user_ini_filename), entry->user_config TSRMLS_CC); } + if (real_path) { + free(real_path); + } entry->expires = request_time + PG(user_ini_cache_ttl); } -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-CVS] svn: /SVNROOT/ global_avail
philip Wed, 10 Aug 2011 18:17:29 + Revision: http://svn.php.net/viewvc?view=revision&revision=314767 Log: Bump cweiske karma from phd to phpdoc Changed paths: U SVNROOT/global_avail Modified: SVNROOT/global_avail === --- SVNROOT/global_avail 2011-08-10 17:40:56 UTC (rev 314766) +++ SVNROOT/global_avail 2011-08-10 18:17:29 UTC (rev 314767) @@ -39,7 +39,7 @@ # Some people only work on PhD (The DocBook [manual] build system) # Those with php-src and/or phpdoc karma already have access to this -avail|loudi,cweiske,mrkschan,pmjones|phd,web/doc,web/doc-editor +avail|loudi,mrkschan,pmjones|phd,web/doc,web/doc-editor # People who work on the Engine - not people with just tests access avail|andi,zeev,andrei,stas,sterling,sascha,derick,sebastian,phanto,jani,hirokawa,fujimoto,rvenkat,sesser,kalowsky,iliaa,hyanantha,georg,wez,edink,helly,hholzgra,imajes,gschlossnagle,moriyoshi,dmitry,jon,pollita,tony2001,johannes,bjori,davidw,nicholsr,wharmby,felipe,robinf,scottmac,nlopess,mattwil,colder,lbarnaud,pajoye,cseiler,dsp,shire,gron,gopalv,gwynne,pierrick|php/php-src/*/Zend,php/php-src/*/TSRM @@ -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,joea
[PHP-CVS] svn: /php/php-src/ branches/PHP_5_3/ext/standard/dns.c branches/PHP_5_4/ext/standard/dns.c trunk/ext/standard/dns.c
rasmus Wed, 10 Aug 2011 17:40:56 + Revision: http://svn.php.net/viewvc?view=revision&revision=314766 Log: Use HOST_NAME_MAX constant here instead for the gethostname() func Changed paths: U php/php-src/branches/PHP_5_3/ext/standard/dns.c U php/php-src/branches/PHP_5_4/ext/standard/dns.c U php/php-src/trunk/ext/standard/dns.c Modified: php/php-src/branches/PHP_5_3/ext/standard/dns.c === --- php/php-src/branches/PHP_5_3/ext/standard/dns.c 2011-08-10 16:43:02 UTC (rev 314765) +++ php/php-src/branches/PHP_5_3/ext/standard/dns.c 2011-08-10 17:40:56 UTC (rev 314766) @@ -66,6 +66,12 @@ #define MAXHOSTNAMELEN 255 #endif +/* For the local hostname obtained via gethostname which is different from the + dns-related MAXHOSTNAMELEN constant above */ +#ifndef HOST_NAME_MAX +#define HOST_NAME_MAX 255 +#endif + #include "php_dns.h" /* type compat */ @@ -122,7 +128,7 @@ Get the host name of the current machine */ PHP_FUNCTION(gethostname) { - char buf[MAXHOSTNAMELEN]; + char buf[HOST_NAME_MAX]; if (zend_parse_parameters_none() == FAILURE) { return; Modified: php/php-src/branches/PHP_5_4/ext/standard/dns.c === --- php/php-src/branches/PHP_5_4/ext/standard/dns.c 2011-08-10 16:43:02 UTC (rev 314765) +++ php/php-src/branches/PHP_5_4/ext/standard/dns.c 2011-08-10 17:40:56 UTC (rev 314766) @@ -66,6 +66,12 @@ #define MAXHOSTNAMELEN 255 #endif +/* For the local hostname obtained via gethostname which is different from the + dns-related MAXHOSTNAMELEN constant above */ +#ifndef HOST_NAME_MAX +#define HOST_NAME_MAX 255 +#endif + #include "php_dns.h" /* type compat */ @@ -122,7 +128,7 @@ Get the host name of the current machine */ PHP_FUNCTION(gethostname) { - char buf[MAXHOSTNAMELEN]; + char buf[HOST_NAME_MAX]; if (zend_parse_parameters_none() == FAILURE) { return; Modified: php/php-src/trunk/ext/standard/dns.c === --- php/php-src/trunk/ext/standard/dns.c2011-08-10 16:43:02 UTC (rev 314765) +++ php/php-src/trunk/ext/standard/dns.c2011-08-10 17:40:56 UTC (rev 314766) @@ -66,6 +66,12 @@ #define MAXHOSTNAMELEN 255 #endif +/* For the local hostname obtained via gethostname which is different from the + dns-related MAXHOSTNAMELEN constant above */ +#ifndef HOST_NAME_MAX +#define HOST_NAME_MAX 255 +#endif + #include "php_dns.h" /* type compat */ @@ -122,7 +128,7 @@ Get the host name of the current machine */ PHP_FUNCTION(gethostname) { - char buf[MAXHOSTNAMELEN]; + char buf[HOST_NAME_MAX]; if (zend_parse_parameters_none() == FAILURE) { return; -- 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/dns.c branches/PHP_5_4/ext/standard/dns.c trunk/ext/standard/dns.c
hi Ilia, This does not sound correct and somehow random (host names are not paths). See http://msdn.microsoft.com/en-us/library/ms738532(v=vs.85).aspx for an example. On Wed, Aug 10, 2011 at 5:59 PM, Ilia Alshanetsky wrote: > iliaa Wed, 10 Aug 2011 15:59:32 + > > Revision: http://svn.php.net/viewvc?view=revision&revision=314753 > > Log: > Fix win32 build > > Changed paths: > U php/php-src/branches/PHP_5_3/ext/standard/dns.c > U php/php-src/branches/PHP_5_4/ext/standard/dns.c > U php/php-src/trunk/ext/standard/dns.c > > Modified: php/php-src/branches/PHP_5_3/ext/standard/dns.c > === > --- php/php-src/branches/PHP_5_3/ext/standard/dns.c 2011-08-10 15:55:36 > UTC (rev 314752) > +++ php/php-src/branches/PHP_5_3/ext/standard/dns.c 2011-08-10 15:59:32 > UTC (rev 314753) > @@ -62,6 +62,10 @@ > #define AF_INET 2 /* internetwork: UDP, TCP, etc. */ > #endif > > +#ifndef MAXHOSTNAMELEN > +#define MAXHOSTNAMELEN 255 > +#endif > + > #include "php_dns.h" > > /* type compat */ > > Modified: php/php-src/branches/PHP_5_4/ext/standard/dns.c > === > --- php/php-src/branches/PHP_5_4/ext/standard/dns.c 2011-08-10 15:55:36 > UTC (rev 314752) > +++ php/php-src/branches/PHP_5_4/ext/standard/dns.c 2011-08-10 15:59:32 > UTC (rev 314753) > @@ -62,6 +62,10 @@ > #define AF_INET 2 /* internetwork: UDP, TCP, etc. */ > #endif > > +#ifndef MAXHOSTNAMELEN > +#define MAXHOSTNAMELEN 255 > +#endif > + > #include "php_dns.h" > > /* type compat */ > > Modified: php/php-src/trunk/ext/standard/dns.c > === > --- php/php-src/trunk/ext/standard/dns.c 2011-08-10 15:55:36 UTC (rev > 314752) > +++ php/php-src/trunk/ext/standard/dns.c 2011-08-10 15:59:32 UTC (rev > 314753) > @@ -62,6 +62,10 @@ > #define AF_INET 2 /* internetwork: UDP, TCP, etc. */ > #endif > > +#ifndef MAXHOSTNAMELEN > +#define MAXHOSTNAMELEN 255 > +#endif > + > #include "php_dns.h" > > /* type compat */ > > > -- > 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_4/ NEWS
derick Wed, 10 Aug 2011 16:34:39 + Revision: http://svn.php.net/viewvc?view=revision&revision=314762 Log: - Getting rid of the BOM. 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-08-10 16:31:29 UTC (rev 314761) +++ php/php-src/branches/PHP_5_4/NEWS 2011-08-10 16:34:39 UTC (rev 314762) @@ -1,4 +1,4 @@ -PHP NEWS +PHPNEWS ||| ?? ??? 2011, PHP 5.4.0 Beta - General improvements: -- 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/main/main.c branches/PHP_5_4/php.ini-development branches/PHP_5_4/php.ini-production trunk/main/main.c trunk/php.ini-development trunk/php.ini-production
derick Wed, 10 Aug 2011 16:31:29 + Revision: http://svn.php.net/viewvc?view=revision&revision=314761 Log: - Turn on html_errors by default again in php.ini-production like it was in PHP 5.3, but only generate docref links when the docref_root INI setting is not empty. Changed paths: U php/php-src/branches/PHP_5_4/main/main.c U php/php-src/branches/PHP_5_4/php.ini-development U php/php-src/branches/PHP_5_4/php.ini-production U php/php-src/trunk/main/main.c U php/php-src/trunk/php.ini-development U php/php-src/trunk/php.ini-production Modified: php/php-src/branches/PHP_5_4/main/main.c === --- php/php-src/branches/PHP_5_4/main/main.c 2011-08-10 16:29:31 UTC (rev 314760) +++ php/php-src/branches/PHP_5_4/main/main.c 2011-08-10 16:31:29 UTC (rev 314761) @@ -721,10 +721,10 @@ } /* we have a docref for a function AND - * - we show erroes in html mode OR - * - the user wants to see the links anyway + * - we show errors in html mode AND + * - the user wants to see the links */ - if (docref && is_function && (PG(html_errors) || strlen(PG(docref_root { + if (docref && is_function && PG(html_errors) && strlen(PG(docref_root))) { if (strncmp(docref, "http://";, 7)) { /* We don't have 'http://' so we use docref_root */ Modified: php/php-src/branches/PHP_5_4/php.ini-development === --- php/php-src/branches/PHP_5_4/php.ini-development 2011-08-10 16:29:31 UTC (rev 314760) +++ php/php-src/branches/PHP_5_4/php.ini-development 2011-08-10 16:31:29 UTC (rev 314761) @@ -109,7 +109,7 @@ ; html_errors ; Default Value: On ; Development Value: On -; Production value: Off +; Production value: On ; log_errors ; Default Value: Off @@ -532,23 +532,24 @@ ; An XML-RPC faultCode ;xmlrpc_error_number = 0 -; When PHP displays or logs an error, it has the capability of inserting html -; links to documentation related to that error. This directive controls whether -; those HTML links appear in error messages or not. For performance and security -; reasons, it's recommended you disable this on production servers. +; When PHP displays or logs an error, it has the capability of formatting the +; error message as HTML for easier reading. This directive controls whether +; the error message is formatted as HTML or not. ; Note: This directive is hardcoded to Off for the CLI SAPI ; Default Value: On ; Development Value: On -; Production value: Off +; Production value: On ; http://php.net/html-errors html_errors = On -; If html_errors is set On PHP produces clickable error messages that direct -; to a page describing the error or function causing the error in detail. +; If html_errors is set to On *and* docref_root is not empty, then PHP +; produces clickable error messages that direct to a page describing the error +; or function causing the error in detail. ; You can download a copy of the PHP manual from http://php.net/docs ; and change docref_root to the base URL of your local copy including the ; leading '/'. You must also specify the file extension being used including -; the dot. PHP's default behavior is to leave these settings empty. +; the dot. PHP's default behavior is to leave these settings empty, in which +; case no links to documentation are generated. ; Note: Never use this feature for production boxes. ; http://php.net/docref-root ; Examples Modified: php/php-src/branches/PHP_5_4/php.ini-production === --- php/php-src/branches/PHP_5_4/php.ini-production 2011-08-10 16:29:31 UTC (rev 314760) +++ php/php-src/branches/PHP_5_4/php.ini-production 2011-08-10 16:31:29 UTC (rev 314761) @@ -109,7 +109,7 @@ ; html_errors ; Default Value: On ; Development Value: On -; Production value: Off +; Production value: On ; log_errors ; Default Value: Off @@ -532,23 +532,24 @@ ; An XML-RPC faultCode ;xmlrpc_error_number = 0 -; When PHP displays or logs an error, it has the capability of inserting html -; links to documentation related to that error. This directive controls whether -; those HTML links appear in error messages or not. For performance and security -; reasons, it's recommended you disable this on production servers. +; When PHP displays or logs an error, it has the capability of formatting the +; error message as HTML for easier reading. This directive controls whether +; the error message is formatted as HTML or not. ; Note: This directive is hardcoded to Off for the CLI SAPI ; Default Value: On ; Development Value: On -; Production value: Off +; Production value: On ; http://php.net/html-errors -html_errors = Off +html_errors = On -; If html_errors is set On PHP produces clickable error messages that direct -; to a page describing the error or function causing the error in detail. +; If html_e
[PHP-CVS] svn: /php/php-src/ branches/PHP_5_3/ext/standard/dns.c branches/PHP_5_4/ext/standard/dns.c trunk/ext/standard/dns.c
iliaaWed, 10 Aug 2011 15:59:32 + Revision: http://svn.php.net/viewvc?view=revision&revision=314753 Log: Fix win32 build Changed paths: U php/php-src/branches/PHP_5_3/ext/standard/dns.c U php/php-src/branches/PHP_5_4/ext/standard/dns.c U php/php-src/trunk/ext/standard/dns.c Modified: php/php-src/branches/PHP_5_3/ext/standard/dns.c === --- php/php-src/branches/PHP_5_3/ext/standard/dns.c 2011-08-10 15:55:36 UTC (rev 314752) +++ php/php-src/branches/PHP_5_3/ext/standard/dns.c 2011-08-10 15:59:32 UTC (rev 314753) @@ -62,6 +62,10 @@ #define AF_INET 2 /* internetwork: UDP, TCP, etc. */ #endif +#ifndef MAXHOSTNAMELEN +#define MAXHOSTNAMELEN 255 +#endif + #include "php_dns.h" /* type compat */ Modified: php/php-src/branches/PHP_5_4/ext/standard/dns.c === --- php/php-src/branches/PHP_5_4/ext/standard/dns.c 2011-08-10 15:55:36 UTC (rev 314752) +++ php/php-src/branches/PHP_5_4/ext/standard/dns.c 2011-08-10 15:59:32 UTC (rev 314753) @@ -62,6 +62,10 @@ #define AF_INET 2 /* internetwork: UDP, TCP, etc. */ #endif +#ifndef MAXHOSTNAMELEN +#define MAXHOSTNAMELEN 255 +#endif + #include "php_dns.h" /* type compat */ Modified: php/php-src/trunk/ext/standard/dns.c === --- php/php-src/trunk/ext/standard/dns.c2011-08-10 15:55:36 UTC (rev 314752) +++ php/php-src/trunk/ext/standard/dns.c2011-08-10 15:59:32 UTC (rev 314753) @@ -62,6 +62,10 @@ #define AF_INET 2 /* internetwork: UDP, TCP, etc. */ #endif +#ifndef MAXHOSTNAMELEN +#define MAXHOSTNAMELEN 255 +#endif + #include "php_dns.h" /* type compat */ -- 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/sqlite3/sqlite3.c branches/PHP_5_4/ext/sqlite3/sqlite3.c trunk/ext/sqlite3/sqlite3.c
iliaaWed, 10 Aug 2011 15:30:07 + Revision: http://svn.php.net/viewvc?view=revision&revision=314749 Log: Fixed memset usage (identified by coverity) Changed paths: U php/php-src/branches/PHP_5_3/ext/sqlite3/sqlite3.c U php/php-src/branches/PHP_5_4/ext/sqlite3/sqlite3.c U php/php-src/trunk/ext/sqlite3/sqlite3.c Modified: php/php-src/branches/PHP_5_3/ext/sqlite3/sqlite3.c === --- php/php-src/branches/PHP_5_3/ext/sqlite3/sqlite3.c 2011-08-10 14:56:59 UTC (rev 314748) +++ php/php-src/branches/PHP_5_3/ext/sqlite3/sqlite3.c 2011-08-10 15:30:07 UTC (rev 314749) @@ -2006,7 +2006,7 @@ /* Allocate memory for it */ intern = emalloc(sizeof(php_sqlite3_db_object)); - memset(&intern->zo, 0, sizeof(php_sqlite3_db_object)); + memset(intern, 0, sizeof(php_sqlite3_db_object)); intern->exception = 0; /* Need to keep track of things to free */ @@ -2030,7 +2030,7 @@ /* Allocate memory for it */ intern = emalloc(sizeof(php_sqlite3_stmt)); - memset(&intern->zo, 0, sizeof(php_sqlite3_stmt)); + memset(intern, 0, sizeof(php_sqlite3_stmt)); intern->db_obj_zval = NULL; @@ -2052,7 +2052,7 @@ /* Allocate memory for it */ intern = emalloc(sizeof(php_sqlite3_result)); - memset(&intern->zo, 0, sizeof(php_sqlite3_result)); + memset(intern, 0, sizeof(php_sqlite3_result)); intern->complete = 0; intern->is_prepared_statement = 0; Modified: php/php-src/branches/PHP_5_4/ext/sqlite3/sqlite3.c === --- php/php-src/branches/PHP_5_4/ext/sqlite3/sqlite3.c 2011-08-10 14:56:59 UTC (rev 314748) +++ php/php-src/branches/PHP_5_4/ext/sqlite3/sqlite3.c 2011-08-10 15:30:07 UTC (rev 314749) @@ -2002,7 +2002,7 @@ /* Allocate memory for it */ intern = emalloc(sizeof(php_sqlite3_db_object)); - memset(&intern->zo, 0, sizeof(php_sqlite3_db_object)); + memset(intern, 0, sizeof(php_sqlite3_db_object)); intern->exception = 0; /* Need to keep track of things to free */ @@ -2025,7 +2025,7 @@ /* Allocate memory for it */ intern = emalloc(sizeof(php_sqlite3_stmt)); - memset(&intern->zo, 0, sizeof(php_sqlite3_stmt)); + memset(intern, 0, sizeof(php_sqlite3_stmt)); intern->db_obj_zval = NULL; @@ -2046,7 +2046,7 @@ /* Allocate memory for it */ intern = emalloc(sizeof(php_sqlite3_result)); - memset(&intern->zo, 0, sizeof(php_sqlite3_result)); + memset(intern, 0, sizeof(php_sqlite3_result)); intern->complete = 0; intern->is_prepared_statement = 0; Modified: php/php-src/trunk/ext/sqlite3/sqlite3.c === --- php/php-src/trunk/ext/sqlite3/sqlite3.c 2011-08-10 14:56:59 UTC (rev 314748) +++ php/php-src/trunk/ext/sqlite3/sqlite3.c 2011-08-10 15:30:07 UTC (rev 314749) @@ -2002,7 +2002,7 @@ /* Allocate memory for it */ intern = emalloc(sizeof(php_sqlite3_db_object)); - memset(&intern->zo, 0, sizeof(php_sqlite3_db_object)); + memset(intern, 0, sizeof(php_sqlite3_db_object)); intern->exception = 0; /* Need to keep track of things to free */ @@ -2025,7 +2025,7 @@ /* Allocate memory for it */ intern = emalloc(sizeof(php_sqlite3_stmt)); - memset(&intern->zo, 0, sizeof(php_sqlite3_stmt)); + memset(intern, 0, sizeof(php_sqlite3_stmt)); intern->db_obj_zval = NULL; @@ -2046,7 +2046,7 @@ /* Allocate memory for it */ intern = emalloc(sizeof(php_sqlite3_result)); - memset(&intern->zo, 0, sizeof(php_sqlite3_result)); + memset(intern, 0, sizeof(php_sqlite3_result)); intern->complete = 0; intern->is_prepared_statement = 0; -- 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.c branches/PHP_5_3/ext/mysqlnd/mysqlnd_structs.h branches/PHP_5_4/ext/mysqlnd/mysqlnd.c branches/PHP_5_4/ext/mysqlnd/mysqlnd_structs.h
andrey Wed, 10 Aug 2011 14:12:24 + Revision: http://svn.php.net/viewvc?view=revision&revision=314740 Log: relax constraint Changed paths: U php/php-src/branches/PHP_5_3/ext/mysqlnd/mysqlnd.c U php/php-src/branches/PHP_5_3/ext/mysqlnd/mysqlnd_structs.h U php/php-src/branches/PHP_5_4/ext/mysqlnd/mysqlnd.c U php/php-src/branches/PHP_5_4/ext/mysqlnd/mysqlnd_structs.h U php/php-src/trunk/ext/mysqlnd/mysqlnd.c U php/php-src/trunk/ext/mysqlnd/mysqlnd_structs.h Modified: php/php-src/branches/PHP_5_3/ext/mysqlnd/mysqlnd.c === --- php/php-src/branches/PHP_5_3/ext/mysqlnd/mysqlnd.c 2011-08-10 14:10:44 UTC (rev 314739) +++ php/php-src/branches/PHP_5_3/ext/mysqlnd/mysqlnd.c 2011-08-10 14:12:24 UTC (rev 314740) @@ -1288,7 +1288,7 @@ /* {{{ mysqlnd_conn::escape_string */ static ulong -MYSQLND_METHOD(mysqlnd_conn, escape_string)(const MYSQLND * const conn, char *newstr, const char *escapestr, size_t escapestr_len TSRMLS_DC) +MYSQLND_METHOD(mysqlnd_conn, escape_string)(MYSQLND * const conn, char *newstr, const char *escapestr, size_t escapestr_len TSRMLS_DC) { DBG_ENTER("mysqlnd_conn::escape_string"); DBG_INF_FMT("conn=%llu", conn->thread_id); Modified: php/php-src/branches/PHP_5_3/ext/mysqlnd/mysqlnd_structs.h === --- php/php-src/branches/PHP_5_3/ext/mysqlnd/mysqlnd_structs.h 2011-08-10 14:10:44 UTC (rev 314739) +++ php/php-src/branches/PHP_5_3/ext/mysqlnd/mysqlnd_structs.h 2011-08-10 14:12:24 UTC (rev 314740) @@ -338,7 +338,7 @@ typedef enum_func_status (*func_mysqlnd_conn__init)(MYSQLND * conn TSRMLS_DC); typedef enum_func_status (*func_mysqlnd_conn__connect)(MYSQLND *conn, const char *host, const char * user, const char * passwd, unsigned int passwd_len, const char * db, unsigned int db_len, unsigned int port, const char * socket_or_pipe, unsigned int mysql_flags TSRMLS_DC); -typedef ulong (*func_mysqlnd_conn__escape_string)(const MYSQLND * const conn, char *newstr, const char *escapestr, size_t escapestr_len TSRMLS_DC); +typedef ulong (*func_mysqlnd_conn__escape_string)(MYSQLND * const conn, char *newstr, const char *escapestr, size_t escapestr_len TSRMLS_DC); typedef enum_func_status (*func_mysqlnd_conn__set_charset)(MYSQLND * const conn, const char * const charset TSRMLS_DC); typedef enum_func_status (*func_mysqlnd_conn__query)(MYSQLND *conn, const char *query, unsigned int query_len TSRMLS_DC); typedef enum_func_status (*func_mysqlnd_conn__send_query)(MYSQLND *conn, const char *query, unsigned int query_len TSRMLS_DC); Modified: php/php-src/branches/PHP_5_4/ext/mysqlnd/mysqlnd.c === --- php/php-src/branches/PHP_5_4/ext/mysqlnd/mysqlnd.c 2011-08-10 14:10:44 UTC (rev 314739) +++ php/php-src/branches/PHP_5_4/ext/mysqlnd/mysqlnd.c 2011-08-10 14:12:24 UTC (rev 314740) @@ -1404,7 +1404,7 @@ /* {{{ mysqlnd_conn::escape_string */ static ulong -MYSQLND_METHOD(mysqlnd_conn, escape_string)(const MYSQLND * const conn, char *newstr, const char *escapestr, size_t escapestr_len TSRMLS_DC) +MYSQLND_METHOD(mysqlnd_conn, escape_string)(MYSQLND * const conn, char *newstr, const char *escapestr, size_t escapestr_len TSRMLS_DC) { DBG_ENTER("mysqlnd_conn::escape_string"); DBG_INF_FMT("conn=%llu", conn->thread_id); Modified: php/php-src/branches/PHP_5_4/ext/mysqlnd/mysqlnd_structs.h === --- php/php-src/branches/PHP_5_4/ext/mysqlnd/mysqlnd_structs.h 2011-08-10 14:10:44 UTC (rev 314739) +++ php/php-src/branches/PHP_5_4/ext/mysqlnd/mysqlnd_structs.h 2011-08-10 14:12:24 UTC (rev 314740) @@ -352,7 +352,7 @@ typedef enum_func_status (*func_mysqlnd_conn__init)(MYSQLND * conn TSRMLS_DC); typedef enum_func_status (*func_mysqlnd_conn__connect)(MYSQLND *conn, const char *host, const char * user, const char * passwd, unsigned int passwd_len, const char * db, unsigned int db_len, unsigned int port, const char * socket_or_pipe, unsigned int mysql_flags TSRMLS_DC); -typedef ulong (*func_mysqlnd_conn__escape_string)(const MYSQLND * const conn, char *newstr, const char *escapestr, size_t escapestr_len TSRMLS_DC); +typedef ulong (*func_mysqlnd_conn__escape_string)(MYSQLND * const conn, char *newstr, const char *escapestr, size_t escapestr_len TSRMLS_DC); typedef enum_func_status (*func_mysqlnd_conn__set_charset)(MYSQLND * const conn, const char * const charset TSRMLS_DC); typedef enum_func_status (*func_mysqlnd_conn__query)(MYSQLND *conn, const char *query, unsigned int query_len TSRMLS_DC); typedef enum_func_status (*func_mysqlnd_conn__send_query)(MYSQLND *conn, const char *
[PHP-CVS] svn: /php/php-src/ branches/PHP_5_3/NEWS branches/PHP_5_3/ext/soap/php_encoding.c branches/PHP_5_3/ext/soap/tests/bugs/bug55323.phpt branches/PHP_5_3/ext/soap/tests/bugs/bug55323.wsdl branch
dmitry Wed, 10 Aug 2011 13:44:48 + Revision: http://svn.php.net/viewvc?view=revision&revision=314737 Log: Fixed bug #55323 (SoapClient segmentation fault when XSD_TYPEKIND_EXTENSION contains itself) Bug: https://bugs.php.net/55323 (Assigned) SoapClient segmentation fault when XSD_TYPEKIND_EXTENSION contains itself Changed paths: U php/php-src/branches/PHP_5_3/NEWS U php/php-src/branches/PHP_5_3/ext/soap/php_encoding.c A php/php-src/branches/PHP_5_3/ext/soap/tests/bugs/bug55323.phpt A php/php-src/branches/PHP_5_3/ext/soap/tests/bugs/bug55323.wsdl U php/php-src/branches/PHP_5_4/ext/soap/php_encoding.c A php/php-src/branches/PHP_5_4/ext/soap/tests/bugs/bug55323.phpt A php/php-src/branches/PHP_5_4/ext/soap/tests/bugs/bug55323.wsdl U php/php-src/trunk/ext/soap/php_encoding.c A php/php-src/trunk/ext/soap/tests/bugs/bug55323.phpt A php/php-src/trunk/ext/soap/tests/bugs/bug55323.wsdl Modified: php/php-src/branches/PHP_5_3/NEWS === --- php/php-src/branches/PHP_5_3/NEWS 2011-08-10 13:30:20 UTC (rev 314736) +++ php/php-src/branches/PHP_5_3/NEWS 2011-08-10 13:44:48 UTC (rev 314737) @@ -10,7 +10,12 @@ - MySQLi extension: . Fixed bug #55238 (SSL options set by mysqli_ssl_set ignored for MySQLi persistent connections). (Andrey) - + +- SOAP + . Fixed bug #55323 (SoapClient segmentation fault when XSD_TYPEKIND_EXTENSION +contains itself). (Dmitry) + + 28 Jul 2011, PHP 5.3.7 RC4 - Improved core functions: . Updated crypt_blowfish to 1.2. ((CVE-2011-2483) (Solar Designer) Modified: php/php-src/branches/PHP_5_3/ext/soap/php_encoding.c === --- php/php-src/branches/PHP_5_3/ext/soap/php_encoding.c 2011-08-10 13:30:20 UTC (rev 314736) +++ php/php-src/branches/PHP_5_3/ext/soap/php_encoding.c 2011-08-10 13:44:48 UTC (rev 314737) @@ -114,6 +114,26 @@ } \ } +#define CHECK_XML_NULL(xml) \ + { \ + xmlAttrPtr null; \ + if (!xml) { \ + zval *ret; \ + ALLOC_INIT_ZVAL(ret); \ + ZVAL_NULL(ret); \ + return ret; \ + } \ + if (xml->properties) { \ + null = get_attribute(xml->properties, "nil"); \ + if (null) { \ +zval *ret; \ +ALLOC_INIT_ZVAL(ret); \ +ZVAL_NULL(ret); \ +return ret; \ + } \ + } \ + } + #define FIND_ZVAL_NULL(zval, xml, style) \ { \ if (!zval || Z_TYPE_P(zval) == IS_NULL) { \ @@ -338,6 +358,19 @@ return 0; } +static zval* soap_find_xml_ref(xmlNodePtr node TSRMLS_DC) +{ + zval **data_ptr; + + if (SOAP_GLOBAL(ref_map) && + zend_hash_index_find(SOAP_GLOBAL(ref_map), (ulong)node, (void**)&data_ptr) == SUCCESS) { + Z_SET_ISREF_PP(data_ptr); + Z_ADDREF_PP(data_ptr); + return *data_ptr; + } + return NULL; +} + static zend_bool soap_check_xml_ref(zval **data, xmlNodePtr node TSRMLS_DC) { zval **data_ptr; @@ -1513,6 +1546,11 @@ sdlType->encode->details.sdl_type->kind != XSD_TYPEKIND_LIST && sdlType->encode->details.sdl_type->kind != XSD_TYPEKIND_UNION) { +CHECK_XML_NULL(data); +if ((ret = soap_find_xml_ref(data TSRMLS_CC)) != NULL) { + return ret; +} + if (ce != ZEND_STANDARD_CLASS_DEF_PTR && sdlType->encode->to_zval == sdl_guess_convert_zval && sdlType->encode->details.sdl_type != NULL && @@ -1526,7 +1564,6 @@ } else { ret = master_to_zval_int(sdlType->encode, data); } -FIND_XML_NULL(data, ret); if (soap_check_xml_ref(&ret, data TSRMLS_CC)) { return ret; } Added: php/php-src/branches/PHP_5_3/ext/soap/tests/bugs/bug55323.phpt === --- php/php-src/branches/PHP_5_3/ext/soap/tests/bugs/bug55323.phpt (rev 0) +++ php/php-src/branches/PHP_5_3/ext/soap/tests/bugs/bug55323.phpt 2011-08-10 13:44:48 UTC (rev 314737) @@ -0,0 +1,45 @@ +--TEST-- +Bug #55323 (SoapClient segmentation fault when XSD_TYPEKIND_EXTENSION contains itself) +--SKIPIF-- + +--FILE-- +http://schemas.xmlsoap.org/soap/encoding/"; xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/"; xmlns:ns1="http://test.com/soap/v3/"; xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"; xmlns:xsd="http://www.w3.org/2001/XMLSchema"; xmlns:SOAP-ENC="http://schemas.xmlsoap.org/soap/encoding/";> + + + +1234 + + + + + +EOF; + } + +} + +$soapClient = new TestSoapClient($wsdl, +array('trace' => 1, 'exceptions' => 0)); +$result = $soapClient->getObject(); +var_dump($result); +?> +--EXPECTF-- +object(stdClass)#%d (2) { + ["accountId"]=> + int(1234) + ["parent"]=> + *RECURSION* +} Added: php/php-src/branches/PHP_5_3/ext/soap/tests/bugs/bug55323.wsdl === --- php/php-src/branches/PHP_5_3/ext/soap/tests/bugs/bug55323.wsdl (rev 0) +++ php/ph
[PHP-CVS] svn: /php/php-src/ branches/PHP_5_4/ext/standard/html.c branches/PHP_5_4/ext/standard/php_incomplete_class.h trunk/ext/standard/html.c trunk/ext/standard/php_incomplete_class.h
laruence Wed, 10 Aug 2011 11:59:11 + Revision: http://svn.php.net/viewvc?view=revision&revision=314733 Log: Eliminated compiler's warnings Changed paths: U php/php-src/branches/PHP_5_4/ext/standard/html.c U php/php-src/branches/PHP_5_4/ext/standard/php_incomplete_class.h U php/php-src/trunk/ext/standard/html.c U php/php-src/trunk/ext/standard/php_incomplete_class.h Modified: php/php-src/branches/PHP_5_4/ext/standard/html.c === --- php/php-src/branches/PHP_5_4/ext/standard/html.c2011-08-10 11:20:07 UTC (rev 314732) +++ php/php-src/branches/PHP_5_4/ext/standard/html.c2011-08-10 11:59:11 UTC (rev 314733) @@ -378,7 +378,7 @@ zenc = zend_multibyte_get_internal_encoding(TSRMLS_C); if (zenc != NULL) { - charset_hint = zend_multibyte_get_encoding_name(zenc); + charset_hint = (char *)zend_multibyte_get_encoding_name(zenc); if (charset_hint != NULL && (len=strlen(charset_hint)) != 0) { if ((len == 4) /* sizeof (none|auto|pass) */ && (!memcmp("pass", charset_hint, 4) || @@ -1371,7 +1371,7 @@ unsigned code_point; int valid; char *pos = (char*)&old[cursor+1]; - valid = process_numeric_entity(&pos, &code_point); + valid = process_numeric_entity((const char **)&pos, &code_point); if (valid == FAILURE) goto encode_amp; if (flags & ENT_HTML_SUBSTITUTE_DISALLOWED_CHARS) { Modified: php/php-src/branches/PHP_5_4/ext/standard/php_incomplete_class.h === --- php/php-src/branches/PHP_5_4/ext/standard/php_incomplete_class.h 2011-08-10 11:20:07 UTC (rev 314732) +++ php/php-src/branches/PHP_5_4/ext/standard/php_incomplete_class.h 2011-08-10 11:59:11 UTC (rev 314733) @@ -38,7 +38,7 @@ free_class_name = 1; \ incomplete_class = 1; \ } else { \ - free_class_name = !zend_get_object_classname(struc, &class_name, &name_len TSRMLS_CC);\ + free_class_name = !zend_get_object_classname(struc, (const char **)&class_name, &name_len TSRMLS_CC);\ } #define PHP_CLEANUP_CLASS_ATTRIBUTES() \ Modified: php/php-src/trunk/ext/standard/html.c === --- php/php-src/trunk/ext/standard/html.c 2011-08-10 11:20:07 UTC (rev 314732) +++ php/php-src/trunk/ext/standard/html.c 2011-08-10 11:59:11 UTC (rev 314733) @@ -378,7 +378,7 @@ zenc = zend_multibyte_get_internal_encoding(TSRMLS_C); if (zenc != NULL) { - charset_hint = zend_multibyte_get_encoding_name(zenc); + charset_hint = (char *)zend_multibyte_get_encoding_name(zenc); if (charset_hint != NULL && (len=strlen(charset_hint)) != 0) { if ((len == 4) /* sizeof (none|auto|pass) */ && (!memcmp("pass", charset_hint, 4) || @@ -1371,7 +1371,7 @@ unsigned code_point; int valid; char *pos = (char*)&old[cursor+1]; - valid = process_numeric_entity(&pos, &code_point); + valid = process_numeric_entity((const char **)&pos, &code_point); if (valid == FAILURE) goto encode_amp; if (flags & ENT_HTML_SUBSTITUTE_DISALLOWED_CHARS) { Modified: php/php-src/trunk/ext/standard/php_incomplete_class.h === --- php/php-src/trunk/ext/standard/php_incomplete_class.h 2011-08-10 11:20:07 UTC (rev 314732) +++ php/php-src/trunk/ext/standard/php_incomplete_class.h 2011-08-10 11:59:11 UTC (rev 314733) @@ -38,7 +38,7 @@ free_class_name = 1; \ incomplete_class = 1; \ } else { \ - free_class_name = !zend_get_object_classname(struc, &class_name, &name_len TSRMLS_CC);\ + free_class_name = !zend_get_object_classname(struc, (const char **)&class_name, &name_len TSRMLS_CC);\ } #define PHP_CLEANUP_CLASS_ATTRIBUTES() \ -- 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/main/output.c trunk/main/output.c
mike Wed, 10 Aug 2011 11:01:09 + Revision: http://svn.php.net/viewvc?view=revision&revision=314728 Log: fix coverity issue 1054: missing break/return Changed paths: U php/php-src/branches/PHP_5_4/main/output.c U php/php-src/trunk/main/output.c Modified: php/php-src/branches/PHP_5_4/main/output.c === --- php/php-src/branches/PHP_5_4/main/output.c 2011-08-10 10:56:25 UTC (rev 314727) +++ php/php-src/branches/PHP_5_4/main/output.c 2011-08-10 11:01:09 UTC (rev 314728) @@ -618,6 +618,7 @@ return SUCCESS; case PHP_OUTPUT_HANDLER_HOOK_GET_LEVEL: *(int *) arg = OG(running)->level; +return SUCCESS; case PHP_OUTPUT_HANDLER_HOOK_IMMUTABLE: OG(running)->flags &= ~(PHP_OUTPUT_HANDLER_REMOVABLE|PHP_OUTPUT_HANDLER_CLEANABLE); return SUCCESS; Modified: php/php-src/trunk/main/output.c === --- php/php-src/trunk/main/output.c 2011-08-10 10:56:25 UTC (rev 314727) +++ php/php-src/trunk/main/output.c 2011-08-10 11:01:09 UTC (rev 314728) @@ -618,6 +618,7 @@ return SUCCESS; case PHP_OUTPUT_HANDLER_HOOK_GET_LEVEL: *(int *) arg = OG(running)->level; +return SUCCESS; case PHP_OUTPUT_HANDLER_HOOK_IMMUTABLE: OG(running)->flags &= ~(PHP_OUTPUT_HANDLER_REMOVABLE|PHP_OUTPUT_HANDLER_CLEANABLE); return SUCCESS; -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php