[PHP-CVS-DAILY] cvs: php-src / ChangeLog
changelog Fri Mar 20 01:32:45 2009 UTC Modified files: /php-srcChangeLog Log: ChangeLog update http://cvs.php.net/viewvc.cgi/php-src/ChangeLog?r1=1.3349r2=1.3350diff_format=u Index: php-src/ChangeLog diff -u php-src/ChangeLog:1.3349 php-src/ChangeLog:1.3350 --- php-src/ChangeLog:1.3349Thu Mar 19 01:32:44 2009 +++ php-src/ChangeLog Fri Mar 20 01:32:43 2009 @@ -1,3 +1,114 @@ +2009-03-19 Ilia Alshanetsky i...@prohost.org + +* ext/mbstring/oniguruma/regint.h + ext/sysvshm/sysvshm.c + ext/sysvshm/sysvshm.c: + + MFB: Fixed bug #47721 (Aligment issues in mbstring and sysvshm extension) + +* (PHP_5_2) + NEWS + ext/mbstring/oniguruma/regint.h + ext/sysvshm/sysvshm.c: + + Fixed bug #47721 (Aligment issues in mbstring and sysvshm extension) + +2009-03-19 Steph Fox steph@virgin.net + +* (PHP_5_3) + EXTENSIONS: + - Add self to maintainer list so's I can get bug notifications :) + +* (PHP_5_3) + ext/pdo_dblib/dblib_driver.c + ext/pdo_dblib/dblib_stmt.c: + MFH + - Fix bug #38805 ( PDO Truncates Text from SQL Server Text Data Type + Field) + - Bring behaviour into line with ext/mssql + - Several memleaks plugged + +* ext/pdo_dblib/dblib_driver.c + ext/pdo_dblib/dblib_stmt.c: + - Fix bug #38805 ( PDO Truncates Text from SQL Server Text Data Type Field) + - Bring behaviour into line with ext/mssql + - Several memleaks plugged + +2009-03-19 Matt Wilmas php_li...@realplain.com + +* (PHP_5_2) + ext/json/JSON_parser.c: + MFH: Handle overflow when decoding large numbers and avoid 2 conversions + +* (PHP_5_3) + ext/json/JSON_parser.c: + MFH: Avoid 2 conversions when decoding numbers + +* ext/json/JSON_parser.c: + Avoid 2 conversions when decoding numbers + +* (PHP_5_3) + ZendEngine2/zend_execute_API.c: + MFH: Removed extra space from eval string + +* ZendEngine2/zend_execute.h + ZendEngine2/zend_execute_API.c: + MFB (zend_execute_API.c v1.331.2.20.2.13): Avoid strcpy() strcat() + Removed extra space from eval string, and unnecessary variable + +2009-03-19 Arnaud Le Blanc arnaud...@gmail.com + +* (PHP_5_2) + NEWS + main/streams/streams.c + main/streams/streams.c: + MFH: Better fix for #44607. Fixes #47487 (php_stream_fill_read_buffer() + performance degraded after fix of bug 44607). + +* main/streams/streams.c: + Better fix for #44607. Fixes #47487 (php_stream_fill_read_buffer() + performance degraded after fix of bug 44607). + +2009-03-19 Dmitry Stogov dmi...@zend.com + +* ZendEngine2/zend_hash.h + ZendEngine2/zend_hash.h: + Fixed check for long integer overflow + +2009-03-19 Etienne Kneuss p...@colder.ch + +* (PHP_5_3) + NEWS + ext/spl/spl_array.c: + MFH: Fix #47231 (offsetGet error using incorrect offset) + +* ext/spl/spl_array.c: + Fix #47231 (offsetGet error using incorrect offset) + +* ext/spl/tests/observer_009.phpt + ext/spl/tests/observer_009.phpt: + + Add test covering for #47671 + +* (PHP_5_3) + NEWS + ext/spl/spl_observer.c: + MFH: Fix #47671 (cloning SplObjectStorage instances) + +* ext/spl/spl_observer.c: + Fix #47671 (cloning SplObjectStorage instances) + +2009-03-19 Ilia Alshanetsky i...@prohost.org + +* ext/xmlrpc/xmlrpc-epi-php.c: + + MFB:Improved parameter parsing + +* (PHP_5_3) + ext/xmlrpc/xmlrpc-epi-php.c: + + Improved parameter parsing + 2009-03-18 andy wharmby whar...@uk.ibm.com * ext/date/tests/DateTime_format_variation1.phpt @@ -33624,7 +33735,7 @@ * sapi/litespeed/lsapi_main.c sapi/litespeed/lsapilib.c: - - Added missing $Id: ChangeLog,v 1.3349 2009/03/19 01:32:44 changelog Exp $ tags and nuked c++ comments + - Added missing $Id: ChangeLog,v 1.3350 2009/03/20 01:32:43 changelog Exp $ tags and nuked c++ comments * (PHP_5_3) ext/intl/locale/locale.c
[PHP-CVS] cvs: CVSROOT / avail
pajoye Thu Mar 19 09:39:03 2009 UTC Modified files: /CVSROOTavail Log: - Changhao Jiang karma for hxpro http://cvs.php.net/viewvc.cgi/CVSROOT/avail?r1=1.1501r2=1.1502diff_format=u Index: CVSROOT/avail diff -u CVSROOT/avail:1.1501 CVSROOT/avail:1.1502 --- CVSROOT/avail:1.1501Wed Mar 18 07:19:00 2009 +++ CVSROOT/avail Thu Mar 19 09:39:03 2009 @@ -306,7 +306,7 @@ avail|ab|pecl/gender avail|kristina|pecl/mongo avail|kaigai|pecl/selinux,phpdoc -avail|kannan,veeve|pecl/xhprof,phpdoc +avail|kannan,veeve,cjiang|pecl/xhprof,phpdoc # Objective-C bridge avail|wez,jan|php-objc -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-CVS] cvs: php-src /main/streams streams.c
lbarnaudThu Mar 19 17:54:28 2009 UTC Modified files: /php-src/main/streams streams.c Log: Better fix for #44607. Fixes #47487 (php_stream_fill_read_buffer() performance degraded after fix of bug 44607). http://cvs.php.net/viewvc.cgi/php-src/main/streams/streams.c?r1=1.179r2=1.180diff_format=u Index: php-src/main/streams/streams.c diff -u php-src/main/streams/streams.c:1.179 php-src/main/streams/streams.c:1.180 --- php-src/main/streams/streams.c:1.179Tue Mar 10 23:40:01 2009 +++ php-src/main/streams/streams.c Thu Mar 19 17:54:28 2009 @@ -19,7 +19,7 @@ +--+ */ -/* $Id: streams.c,v 1.179 2009/03/10 23:40:01 helly Exp $ */ +/* $Id: streams.c,v 1.180 2009/03/19 17:54:28 lbarnaud Exp $ */ #define _GNU_SOURCE #include php.h @@ -551,16 +551,16 @@ efree(chunk_buf); } else {/* Unfiltered Binary stream */ - /* reduce buffer memory consumption if possible, to avoid a realloc */ - if (stream-readbuf.s stream-readbuflen - stream-writepos stream-chunk_size) { - memmove(stream-readbuf.s, stream-readbuf.s + stream-readpos, stream-writepos - stream-readpos); - stream-writepos -= stream-readpos; - stream-readpos = 0; - } /* is there enough data in the buffer ? */ - while (stream-writepos - stream-readpos (off_t)size) { + if (stream-writepos - stream-readpos (off_t)size) { size_t justread = 0; - size_t toread; + + /* reduce buffer memory consumption if possible, to avoid a realloc */ + if (stream-readbuf.s stream-readbuflen - stream-writepos stream-chunk_size) { + memmove(stream-readbuf.s, stream-readbuf.s + stream-readpos, stream-writepos - stream-readpos); + stream-writepos -= stream-readpos; + stream-readpos = 0; + } /* grow the buffer if required * TODO: this can fail for persistent streams */ @@ -569,15 +569,10 @@ stream-readbuf.s = (char*)perealloc(stream-readbuf.s, stream-readbuflen, stream-is_persistent); } - toread = stream-readbuflen - stream-writepos; - justread = stream-ops-read(stream, stream-readbuf.s + stream-writepos, toread TSRMLS_CC); - - if (justread != (size_t)-1) { + justread = stream-ops-read(stream, stream-readbuf.s + stream-writepos, stream-readbuflen - stream-writepos TSRMLS_CC); + if (justread != (size_t)-1 justread != 0) { stream-writepos += justread; } - if (stream-eof || justread != toread) { - break; - } } } } @@ -1114,10 +1109,25 @@ PHPAPI char *php_stream_get_record(php_stream *stream, size_t maxlen, size_t *returned_len, char *delim, size_t delim_len TSRMLS_DC) { char *e, *buf; - size_t toread; + size_t toread, len; int skip = 0; - php_stream_fill_read_buffer(stream, maxlen TSRMLS_CC); + len = stream-writepos - stream-readpos; + + while (len maxlen) { + + size_t just_read; + toread = MIN(maxlen - len, stream-chunk_size); + + php_stream_fill_read_buffer(stream, len + toread TSRMLS_CC); + + just_read = (stream-writepos - stream-readpos) - len; + len += just_read; + + if (just_read toread) { + break; + } + } if (delim_len == 0 || !delim) { toread = maxlen; -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-CVS] cvs: php-src(PHP_5_3) /main/streams streams.c
lbarnaudThu Mar 19 17:55:10 2009 UTC Modified files: (Branch: PHP_5_3) /php-src/main/streams streams.c Log: MFH: Better fix for #44607. Fixes #47487 (php_stream_fill_read_buffer() performance degraded after fix of bug 44607). http://cvs.php.net/viewvc.cgi/php-src/main/streams/streams.c?r1=1.82.2.6.2.18.2.23r2=1.82.2.6.2.18.2.24diff_format=u Index: php-src/main/streams/streams.c diff -u php-src/main/streams/streams.c:1.82.2.6.2.18.2.23 php-src/main/streams/streams.c:1.82.2.6.2.18.2.24 --- php-src/main/streams/streams.c:1.82.2.6.2.18.2.23 Thu Jan 8 18:46:00 2009 +++ php-src/main/streams/streams.c Thu Mar 19 17:55:10 2009 @@ -19,7 +19,7 @@ +--+ */ -/* $Id: streams.c,v 1.82.2.6.2.18.2.23 2009/01/08 18:46:00 felipe Exp $ */ +/* $Id: streams.c,v 1.82.2.6.2.18.2.24 2009/03/19 17:55:10 lbarnaud Exp $ */ #define _GNU_SOURCE #include php.h @@ -540,16 +540,16 @@ efree(chunk_buf); } else { - /* reduce buffer memory consumption if possible, to avoid a realloc */ - if (stream-readbuf stream-readbuflen - stream-writepos stream-chunk_size) { - memmove(stream-readbuf, stream-readbuf + stream-readpos, stream-readbuflen - stream-readpos); - stream-writepos -= stream-readpos; - stream-readpos = 0; - } /* is there enough data in the buffer ? */ - while (stream-writepos - stream-readpos (off_t)size) { + if (stream-writepos - stream-readpos (off_t)size) { size_t justread = 0; - size_t toread; + + /* reduce buffer memory consumption if possible, to avoid a realloc */ + if (stream-readbuf stream-readbuflen - stream-writepos stream-chunk_size) { + memmove(stream-readbuf, stream-readbuf + stream-readpos, stream-readbuflen - stream-readpos); + stream-writepos -= stream-readpos; + stream-readpos = 0; + } /* grow the buffer if required * TODO: this can fail for persistent streams */ @@ -559,17 +559,13 @@ stream-is_persistent); } - toread = stream-readbuflen - stream-writepos; justread = stream-ops-read(stream, stream-readbuf + stream-writepos, - toread + stream-readbuflen - stream-writepos TSRMLS_CC); if (justread != (size_t)-1) { stream-writepos += justread; } - if (stream-eof || justread != toread) { - break; - } } } } @@ -868,10 +864,25 @@ PHPAPI char *php_stream_get_record(php_stream *stream, size_t maxlen, size_t *returned_len, char *delim, size_t delim_len TSRMLS_DC) { char *e, *buf; - size_t toread; + size_t toread, len; int skip = 0; - php_stream_fill_read_buffer(stream, maxlen TSRMLS_CC); + len = stream-writepos - stream-readpos; + + while (len maxlen) { + + size_t just_read; + toread = MIN(maxlen - len, stream-chunk_size); + + php_stream_fill_read_buffer(stream, len + toread TSRMLS_CC); + + just_read = (stream-writepos - stream-readpos) - len; + len += just_read; + + if (just_read toread) { + break; + } + } if (delim_len == 0 || !delim) { toread = maxlen; -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-CVS] cvs: php-src(PHP_5_2) / NEWS /main/streams streams.c
lbarnaudThu Mar 19 17:56:02 2009 UTC Modified files: (Branch: PHP_5_2) /php-src/main/streams streams.c /php-srcNEWS Log: MFH: Better fix for #44607. Fixes #47487 (php_stream_fill_read_buffer() performance degraded after fix of bug 44607). http://cvs.php.net/viewvc.cgi/php-src/main/streams/streams.c?r1=1.82.2.6.2.33r2=1.82.2.6.2.34diff_format=u Index: php-src/main/streams/streams.c diff -u php-src/main/streams/streams.c:1.82.2.6.2.33 php-src/main/streams/streams.c:1.82.2.6.2.34 --- php-src/main/streams/streams.c:1.82.2.6.2.33Thu Jan 8 19:21:25 2009 +++ php-src/main/streams/streams.c Thu Mar 19 17:56:00 2009 @@ -19,7 +19,7 @@ +--+ */ -/* $Id: streams.c,v 1.82.2.6.2.33 2009/01/08 19:21:25 felipe Exp $ */ +/* $Id: streams.c,v 1.82.2.6.2.34 2009/03/19 17:56:00 lbarnaud Exp $ */ #define _GNU_SOURCE #include php.h @@ -531,16 +531,16 @@ efree(chunk_buf); } else { - /* reduce buffer memory consumption if possible, to avoid a realloc */ - if (stream-readbuf stream-readbuflen - stream-writepos stream-chunk_size) { - memmove(stream-readbuf, stream-readbuf + stream-readpos, stream-readbuflen - stream-readpos); - stream-writepos -= stream-readpos; - stream-readpos = 0; - } /* is there enough data in the buffer ? */ - while (stream-writepos - stream-readpos (off_t)size) { + if (stream-writepos - stream-readpos (off_t)size) { size_t justread = 0; - size_t toread; + + /* reduce buffer memory consumption if possible, to avoid a realloc */ + if (stream-readbuf stream-readbuflen - stream-writepos stream-chunk_size) { + memmove(stream-readbuf, stream-readbuf + stream-readpos, stream-readbuflen - stream-readpos); + stream-writepos -= stream-readpos; + stream-readpos = 0; + } /* grow the buffer if required * TODO: this can fail for persistent streams */ @@ -550,17 +550,13 @@ stream-is_persistent); } - toread = stream-readbuflen - stream-writepos; justread = stream-ops-read(stream, stream-readbuf + stream-writepos, - toread + stream-readbuflen - stream-writepos TSRMLS_CC); if (justread != (size_t)-1) { stream-writepos += justread; } - if (stream-eof || justread != toread) { - break; - } } } } @@ -859,10 +855,25 @@ PHPAPI char *php_stream_get_record(php_stream *stream, size_t maxlen, size_t *returned_len, char *delim, size_t delim_len TSRMLS_DC) { char *e, *buf; - size_t toread; + size_t toread, len; int skip = 0; - php_stream_fill_read_buffer(stream, maxlen TSRMLS_CC); + len = stream-writepos - stream-readpos; + + while (len maxlen) { + + size_t just_read; + toread = MIN(maxlen - len, stream-chunk_size); + + php_stream_fill_read_buffer(stream, len + toread TSRMLS_CC); + + just_read = (stream-writepos - stream-readpos) - len; + len += just_read; + + if (just_read toread) { + break; + } + } if (delim_len == 0 || !delim) { toread = maxlen; http://cvs.php.net/viewvc.cgi/php-src/NEWS?r1=1.2027.2.547.2.1444r2=1.2027.2.547.2.1445diff_format=u Index: php-src/NEWS diff -u php-src/NEWS:1.2027.2.547.2.1444 php-src/NEWS:1.2027.2.547.2.1445 --- php-src/NEWS:1.2027.2.547.2.1444Wed Mar 18 13:11:30 2009 +++ php-src/NEWSThu Mar 19 17:56:01 2009 @@ -16,6 +16,8 @@ - Fixed bug #47598 (FILTER_VALIDATE_EMAIL is locale aware). (Ilia) - Fixed bug #47546 (Default value for limit parameter in explode is 0, not -1). (Kalle) +- Fixed bug #47487 (performance degraded when reading large chunks after fix of + bug #44607). (Arnaud) - Fixed bug #47435 (FILTER_FLAG_NO_PRIV_RANGE does not work with ipv6 addresses in the filter extension). (Ilia) - Fixed bug #47430 (Errors after writing to nodeValue parameter of an absent -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-CVS] cvs: CVSROOT / avail
pajoye Thu Mar 19 18:15:53 2009 UTC Modified files: /CVSROOTavail Log: - karma for Eric Stewart (QA and co) http://cvs.php.net/viewvc.cgi/CVSROOT/avail?r1=1.1502r2=1.1503diff_format=u Index: CVSROOT/avail diff -u CVSROOT/avail:1.1502 CVSROOT/avail:1.1503 --- CVSROOT/avail:1.1502Thu Mar 19 09:39:03 2009 +++ CVSROOT/avail Thu Mar 19 18:15:52 2009 @@ -41,7 +41,7 @@ # The PHP Documentation Group maintains the documentation and its # translations. -avail|mgdm,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,c! k,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,tofani ni,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_ma! niac,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|phpdoc,phpdoc-ar,phpdoc-bg,phpdoc-cs,phpdoc-da,phpdoc-de,phpdoc-el,phpdoc-es,! phpdoc-fa,phpdoc-fi,phpdoc-fr,phpdoc-he,phpdoc-hk,phpdoc-hu,phpdoc-id, phpdoc-it,phpdoc-ja,phpdoc-kr,phpdoc-lt,phpdoc-nl,phpdoc-pl,phpdoc-pt_BR,phpdoc-pt,phpdoc-ro,phpdoc-ru,phpdoc-sk,phpdoc-sl,phpdoc-sv,phpdoc-tr,phpdoc-tw,phpdoc-zh,phpdoc-ca,phpdoc-no,phd,docweb
[PHP-CVS] cvs: php-src(PHP_5_3) /ext/json JSON_parser.c
mattwil Thu Mar 19 19:26:00 2009 UTC Modified files: (Branch: PHP_5_3) /php-src/ext/json JSON_parser.c Log: MFH: Avoid 2 conversions when decoding numbers http://cvs.php.net/viewvc.cgi/php-src/ext/json/JSON_parser.c?r1=1.1.2.12.2.8r2=1.1.2.12.2.9diff_format=u Index: php-src/ext/json/JSON_parser.c diff -u php-src/ext/json/JSON_parser.c:1.1.2.12.2.8 php-src/ext/json/JSON_parser.c:1.1.2.12.2.9 --- php-src/ext/json/JSON_parser.c:1.1.2.12.2.8 Tue Mar 17 14:57:39 2009 +++ php-src/ext/json/JSON_parser.c Thu Mar 19 19:26:00 2009 @@ -289,16 +289,27 @@ if (type == IS_LONG) { - long l = strtol(buf-c, NULL, 10); - double d = zend_strtod(buf-c, NULL); - if (d LONG_MAX || d LONG_MIN) { - ZVAL_DOUBLE(*z, d); - } else { - ZVAL_LONG(*z, l); + if (buf-c[0] == '-') { + buf-len--; } + + if (buf-len = MAX_LENGTH_OF_LONG - 1) { + if (buf-len == MAX_LENGTH_OF_LONG - 1) { + int cmp = strcmp(buf-c + (buf-c[0] == '-'), long_min_digits); + + if (!(cmp 0 || (cmp == 0 buf-c[0] == '-'))) { + goto use_double; + } + } else { + goto use_double; + } + } + + ZVAL_LONG(*z, strtol(buf-c, NULL, 10)); } else if (type == IS_DOUBLE) { +use_double: ZVAL_DOUBLE(*z, zend_strtod(buf-c, NULL)); } else if (type == IS_STRING) -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-CVS] cvs: php-src(PHP_5_2) /ext/json JSON_parser.c
mattwil Thu Mar 19 19:27:14 2009 UTC Modified files: (Branch: PHP_5_2) /php-src/ext/json JSON_parser.c Log: MFH: Handle overflow when decoding large numbers and avoid 2 conversions http://cvs.php.net/viewvc.cgi/php-src/ext/json/JSON_parser.c?r1=1.1.2.16r2=1.1.2.17diff_format=u Index: php-src/ext/json/JSON_parser.c diff -u php-src/ext/json/JSON_parser.c:1.1.2.16 php-src/ext/json/JSON_parser.c:1.1.2.17 --- php-src/ext/json/JSON_parser.c:1.1.2.16 Tue Mar 17 02:02:45 2009 +++ php-src/ext/json/JSON_parser.c Thu Mar 19 19:27:14 2009 @@ -284,15 +284,27 @@ if (type == IS_LONG) { - long l = strtol(buf-c, NULL, 10); - if (l LONG_MAX || l LONG_MIN) { - ZVAL_DOUBLE(*z, zend_strtod(buf-c, NULL)); - } else { - ZVAL_LONG(*z, l); + if (buf-c[0] == '-') { + buf-len--; } + + if (buf-len = MAX_LENGTH_OF_LONG - 1) { + if (buf-len == MAX_LENGTH_OF_LONG - 1) { + int cmp = strcmp(buf-c + (buf-c[0] == '-'), long_min_digits); + + if (!(cmp 0 || (cmp == 0 buf-c[0] == '-'))) { + goto use_double; + } + } else { + goto use_double; + } + } + + ZVAL_LONG(*z, strtol(buf-c, NULL, 10)); } else if (type == IS_DOUBLE) { +use_double: ZVAL_DOUBLE(*z, zend_strtod(buf-c, NULL)); } else if (type == IS_STRING) -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-CVS] cvs: php-src /ext/pdo_dblib dblib_driver.c dblib_stmt.c
sfoxThu Mar 19 22:15:04 2009 UTC Modified files: /php-src/ext/pdo_dblib dblib_driver.c dblib_stmt.c Log: - Fix bug #38805 ( PDO Truncates Text from SQL Server Text Data Type Field) - Bring behaviour into line with ext/mssql - Several memleaks plugged http://cvs.php.net/viewvc.cgi/php-src/ext/pdo_dblib/dblib_driver.c?r1=1.18r2=1.19diff_format=u Index: php-src/ext/pdo_dblib/dblib_driver.c diff -u php-src/ext/pdo_dblib/dblib_driver.c:1.18 php-src/ext/pdo_dblib/dblib_driver.c:1.19 --- php-src/ext/pdo_dblib/dblib_driver.c:1.18 Tue Mar 10 23:39:28 2009 +++ php-src/ext/pdo_dblib/dblib_driver.cThu Mar 19 22:15:03 2009 @@ -17,7 +17,7 @@ +--+ */ -/* $Id: dblib_driver.c,v 1.18 2009/03/10 23:39:28 helly Exp $ */ +/* $Id: dblib_driver.c,v 1.19 2009/03/19 22:15:03 sfox Exp $ */ #ifdef HAVE_CONFIG_H # include config.h @@ -229,7 +229,11 @@ if (H-link == NULL) { goto cleanup; } - + + if (DBSETOPT(H-link, DBTEXTLIMIT, 2147483647) == FAIL) { + goto cleanup; + } + if (vars[3].optval FAIL == dbuse(H-link, vars[3].optval)) { goto cleanup; } http://cvs.php.net/viewvc.cgi/php-src/ext/pdo_dblib/dblib_stmt.c?r1=1.13r2=1.14diff_format=u Index: php-src/ext/pdo_dblib/dblib_stmt.c diff -u php-src/ext/pdo_dblib/dblib_stmt.c:1.13 php-src/ext/pdo_dblib/dblib_stmt.c:1.14 --- php-src/ext/pdo_dblib/dblib_stmt.c:1.13 Tue Mar 10 23:39:28 2009 +++ php-src/ext/pdo_dblib/dblib_stmt.c Thu Mar 19 22:15:03 2009 @@ -17,7 +17,7 @@ +--+ */ -/* $Id: dblib_stmt.c,v 1.13 2009/03/10 23:39:28 helly Exp $ */ +/* $Id: dblib_stmt.c,v 1.14 2009/03/19 22:15:03 sfox Exp $ */ #ifdef HAVE_CONFIG_H # include config.h @@ -113,18 +113,27 @@ stmt-column_count = S-ncols; for (i = 0, j = 0; i S-ncols; i++) { + char *tmp = NULL; + S-cols[i].coltype = dbcoltype(H-link, i+1); - S-cols[i].name = dbcolname(H-link, i+1); - if (S-cols[i].name) { - S-cols[i].name = estrdup(S-cols[i].name); - } else if (j) { - spprintf(S-cols[i].name, 0, computed%d, j++); - } else { - S-cols[i].name = estrdup(computed); - j++; + S-cols[i].name = (char*)dbcolname(H-link, i+1); + + if (!strlen(S-cols[i].name)) { + if (j) { + spprintf(tmp, 0, computed%d, j++); + strlcpy(S-cols[i].name, tmp, strlen(tmp)+1); + efree(tmp); + } else { + S-cols[i].name = computed; + j++; + } } - S-cols[i].source = dbcolsource(H-link, i+1); - S-cols[i].source = estrdup(S-cols[i].source ? S-cols[i].source : ); + + S-cols[i].source = (char*)dbcolsource(H-link, i+1); + tmp = estrdup(S-cols[i].source ? S-cols[i].source : ); + S-cols[i].source = tmp; + efree(tmp); + S-cols[i].maxlen = dbcollen(H-link, i+1); } } -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-CVS] cvs: php-src(PHP_5_3) / EXTENSIONS
sfoxThu Mar 19 22:44:55 2009 UTC Modified files: (Branch: PHP_5_3) /php-srcEXTENSIONS Log: - Add self to maintainer list so's I can get bug notifications :) http://cvs.php.net/viewvc.cgi/php-src/EXTENSIONS?r1=1.72.2.4.2.4.2.12r2=1.72.2.4.2.4.2.13diff_format=u Index: php-src/EXTENSIONS diff -u php-src/EXTENSIONS:1.72.2.4.2.4.2.12 php-src/EXTENSIONS:1.72.2.4.2.4.2.13 --- php-src/EXTENSIONS:1.72.2.4.2.4.2.12Thu Feb 5 13:46:11 2009 +++ php-src/EXTENSIONS Thu Mar 19 22:44:55 2009 @@ -449,7 +449,7 @@ STATUS: Working --- EXTENSION: phar -PRIMARY MAINTAINER: Greg Beaver cel...@php.net, Marcus Börger he...@php.net +PRIMARY MAINTAINER: Greg Beaver cel...@php.net, Marcus Börger he...@php.net, Steph Fox s...@php.net MAINTENANCE: Maintained STATUS: Working SINCE: 5.3 -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-CVS] cvs: php-src(PHP_5_3) /ext/pdo_dblib dblib_driver.c dblib_stmt.c
sfoxThu Mar 19 22:16:29 2009 UTC Modified files: (Branch: PHP_5_3) /php-src/ext/pdo_dblib dblib_driver.c dblib_stmt.c Log: MFH - Fix bug #38805 ( PDO Truncates Text from SQL Server Text Data Type Field) - Bring behaviour into line with ext/mssql - Several memleaks plugged http://cvs.php.net/viewvc.cgi/php-src/ext/pdo_dblib/dblib_driver.c?r1=1.9.2.2.2.2.2.2r2=1.9.2.2.2.2.2.3diff_format=u Index: php-src/ext/pdo_dblib/dblib_driver.c diff -u php-src/ext/pdo_dblib/dblib_driver.c:1.9.2.2.2.2.2.2 php-src/ext/pdo_dblib/dblib_driver.c:1.9.2.2.2.2.2.3 --- php-src/ext/pdo_dblib/dblib_driver.c:1.9.2.2.2.2.2.2Wed Dec 31 11:15:41 2008 +++ php-src/ext/pdo_dblib/dblib_driver.cThu Mar 19 22:16:29 2009 @@ -17,7 +17,7 @@ +--+ */ -/* $Id: dblib_driver.c,v 1.9.2.2.2.2.2.2 2008/12/31 11:15:41 sebastian Exp $ */ +/* $Id: dblib_driver.c,v 1.9.2.2.2.2.2.3 2009/03/19 22:16:29 sfox Exp $ */ #ifdef HAVE_CONFIG_H # include config.h @@ -229,7 +229,11 @@ if (H-link == NULL) { goto cleanup; } - + + if (DBSETOPT(H-link, DBTEXTLIMIT, 2147483647) == FAIL) { + goto cleanup; + } + if (vars[3].optval FAIL == dbuse(H-link, vars[3].optval)) { goto cleanup; } http://cvs.php.net/viewvc.cgi/php-src/ext/pdo_dblib/dblib_stmt.c?r1=1.6.2.2.2.4.2.2r2=1.6.2.2.2.4.2.3diff_format=u Index: php-src/ext/pdo_dblib/dblib_stmt.c diff -u php-src/ext/pdo_dblib/dblib_stmt.c:1.6.2.2.2.4.2.2 php-src/ext/pdo_dblib/dblib_stmt.c:1.6.2.2.2.4.2.3 --- php-src/ext/pdo_dblib/dblib_stmt.c:1.6.2.2.2.4.2.2 Wed Dec 31 11:15:41 2008 +++ php-src/ext/pdo_dblib/dblib_stmt.c Thu Mar 19 22:16:29 2009 @@ -17,7 +17,7 @@ +--+ */ -/* $Id: dblib_stmt.c,v 1.6.2.2.2.4.2.2 2008/12/31 11:15:41 sebastian Exp $ */ +/* $Id: dblib_stmt.c,v 1.6.2.2.2.4.2.3 2009/03/19 22:16:29 sfox Exp $ */ #ifdef HAVE_CONFIG_H # include config.h @@ -113,18 +113,27 @@ stmt-column_count = S-ncols; for (i = 0, j = 0; i S-ncols; i++) { + char *tmp = NULL; + S-cols[i].coltype = dbcoltype(H-link, i+1); - S-cols[i].name = dbcolname(H-link, i+1); - if (S-cols[i].name) { - S-cols[i].name = estrdup(S-cols[i].name); - } else if (j) { - spprintf(S-cols[i].name, 0, computed%d, j++); - } else { - S-cols[i].name = estrdup(computed); - j++; + S-cols[i].name = (char*)dbcolname(H-link, i+1); + + if (!strlen(S-cols[i].name)) { + if (j) { + spprintf(tmp, 0, computed%d, j++); + strlcpy(S-cols[i].name, tmp, strlen(tmp)+1); + efree(tmp); + } else { + S-cols[i].name = computed; + j++; + } } - S-cols[i].source = dbcolsource(H-link, i+1); - S-cols[i].source = estrdup(S-cols[i].source ? S-cols[i].source : ); + + S-cols[i].source = (char*)dbcolsource(H-link, i+1); + tmp = estrdup(S-cols[i].source ? S-cols[i].source : ); + S-cols[i].source = tmp; + efree(tmp); + S-cols[i].maxlen = dbcollen(H-link, i+1); } } -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-CVS] cvs: php-src(PHP_5_2) / NEWS /ext/mbstring/oniguruma regint.h /ext/sysvshm sysvshm.c
iliaa Thu Mar 19 23:10:45 2009 UTC Modified files: (Branch: PHP_5_2) /php-src/ext/mbstring/oniguruma regint.h /php-src/ext/sysvshmsysvshm.c /php-srcNEWS Log: Fixed bug #47721 (Aligment issues in mbstring and sysvshm extension) http://cvs.php.net/viewvc.cgi/php-src/ext/mbstring/oniguruma/regint.h?r1=1.5.4.7r2=1.5.4.8diff_format=u Index: php-src/ext/mbstring/oniguruma/regint.h diff -u php-src/ext/mbstring/oniguruma/regint.h:1.5.4.7 php-src/ext/mbstring/oniguruma/regint.h:1.5.4.8 --- php-src/ext/mbstring/oniguruma/regint.h:1.5.4.7 Wed Dec 31 11:17:39 2008 +++ php-src/ext/mbstring/oniguruma/regint.h Thu Mar 19 23:10:44 2009 @@ -256,7 +256,7 @@ #define NULL_UCHARP ((UChar* )0) #ifndef PLATFORM_UNALIGNED_WORD_ACCESS -#define WORD_ALIGNMENT_SIZE SIZEOF_INT +#define WORD_ALIGNMENT_SIZE SIZEOF_LONG #define GET_ALIGNMENT_PAD_SIZE(addr,pad_size) do {\ (pad_size) = WORD_ALIGNMENT_SIZE \ http://cvs.php.net/viewvc.cgi/php-src/ext/sysvshm/sysvshm.c?r1=1.70.2.2.2.7r2=1.70.2.2.2.8diff_format=u Index: php-src/ext/sysvshm/sysvshm.c diff -u php-src/ext/sysvshm/sysvshm.c:1.70.2.2.2.7 php-src/ext/sysvshm/sysvshm.c:1.70.2.2.2.8 --- php-src/ext/sysvshm/sysvshm.c:1.70.2.2.2.7 Wed Dec 31 11:17:46 2008 +++ php-src/ext/sysvshm/sysvshm.c Thu Mar 19 23:10:44 2009 @@ -16,7 +16,7 @@ +--+ */ -/* $Id: sysvshm.c,v 1.70.2.2.2.7 2008/12/31 11:17:46 sebastian Exp $ */ +/* $Id: sysvshm.c,v 1.70.2.2.2.8 2009/03/19 23:10:44 iliaa Exp $ */ /* This has been built and tested on Linux 2.2.14 * @@ -375,7 +375,7 @@ long total_size; long shm_varpos; - total_size = ((long) (len + sizeof(sysvshm_chunk) - 1) / 4) * 4 + 4; /* 4-byte alligment */ + total_size = ((long) (len + sizeof(sysvshm_chunk) - 1) / sizeof(long)) * sizeof(long) + sizeof(long); /* long alligment */ if ((shm_varpos = php_check_shm_data(ptr, key)) 0) { php_remove_shm_data(ptr, shm_varpos); http://cvs.php.net/viewvc.cgi/php-src/NEWS?r1=1.2027.2.547.2.1445r2=1.2027.2.547.2.1446diff_format=u Index: php-src/NEWS diff -u php-src/NEWS:1.2027.2.547.2.1445 php-src/NEWS:1.2027.2.547.2.1446 --- php-src/NEWS:1.2027.2.547.2.1445Thu Mar 19 17:56:01 2009 +++ php-src/NEWSThu Mar 19 23:10:44 2009 @@ -6,6 +6,8 @@ - Fixed memory corruptions while reading properties of zip files. (Ilia) +- Fixed bug #47721 (Aligment issues in mbstring and sysvshm extension) + (crrodriguez at opensuse dot org, Ilia) - Fixed bug #47704 (PHP crashes on some bad operations with string offsets). (Dmitry) - Fixed bug #47667 (ZipArchive::OVERWRITE seems to have no effect). (Mikko, Pierre) -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-CVS] cvs: php-src(PHP_5_3) /ext/sysvshm sysvshm.c
iliaa Thu Mar 19 23:11:32 2009 UTC Modified files: (Branch: PHP_5_3) /php-src/ext/sysvshmsysvshm.c Log: MFB: Fixed bug #47721 (Aligment issues in mbstring and sysvshm extension) http://cvs.php.net/viewvc.cgi/php-src/ext/sysvshm/sysvshm.c?r1=1.70.2.2.2.5.2.11r2=1.70.2.2.2.5.2.12diff_format=u Index: php-src/ext/sysvshm/sysvshm.c diff -u php-src/ext/sysvshm/sysvshm.c:1.70.2.2.2.5.2.11 php-src/ext/sysvshm/sysvshm.c:1.70.2.2.2.5.2.12 --- php-src/ext/sysvshm/sysvshm.c:1.70.2.2.2.5.2.11 Tue Mar 17 23:21:37 2009 +++ php-src/ext/sysvshm/sysvshm.c Thu Mar 19 23:11:32 2009 @@ -16,7 +16,7 @@ +--+ */ -/* $Id: sysvshm.c,v 1.70.2.2.2.5.2.11 2009/03/17 23:21:37 iliaa Exp $ */ +/* $Id: sysvshm.c,v 1.70.2.2.2.5.2.12 2009/03/19 23:11:32 iliaa Exp $ */ /* This has been built and tested on Linux 2.2.14 * @@ -357,7 +357,7 @@ long total_size; long shm_varpos; - total_size = ((long) (len + sizeof(sysvshm_chunk) - 1) / 4) * 4 + 4; /* 4-byte alligment */ + total_size = ((long) (len + sizeof(sysvshm_chunk) - 1) / sizeof(long)) * sizeof(long) + sizeof(long); /* long alligment */ if ((shm_varpos = php_check_shm_data(ptr, key)) 0) { php_remove_shm_data(ptr, shm_varpos); -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-CVS] cvs: php-src /ext/mbstring/oniguruma regint.h /ext/sysvshm sysvshm.c
iliaa Thu Mar 19 23:11:54 2009 UTC Modified files: /php-src/ext/mbstring/oniguruma regint.h /php-src/ext/sysvshmsysvshm.c Log: MFB: Fixed bug #47721 (Aligment issues in mbstring and sysvshm extension) http://cvs.php.net/viewvc.cgi/php-src/ext/mbstring/oniguruma/regint.h?r1=1.6r2=1.7diff_format=u Index: php-src/ext/mbstring/oniguruma/regint.h diff -u php-src/ext/mbstring/oniguruma/regint.h:1.6 php-src/ext/mbstring/oniguruma/regint.h:1.7 --- php-src/ext/mbstring/oniguruma/regint.h:1.6 Sat Jul 12 23:54:30 2008 +++ php-src/ext/mbstring/oniguruma/regint.h Thu Mar 19 23:11:54 2009 @@ -232,7 +232,7 @@ #define NULL_UCHARP ((UChar* )0) #ifndef PLATFORM_UNALIGNED_WORD_ACCESS -#define WORD_ALIGNMENT_SIZE SIZEOF_INT +#define WORD_ALIGNMENT_SIZE SIZEOF_LONG #define GET_ALIGNMENT_PAD_SIZE(addr,pad_size) do {\ (pad_size) = WORD_ALIGNMENT_SIZE \ http://cvs.php.net/viewvc.cgi/php-src/ext/sysvshm/sysvshm.c?r1=1.87r2=1.88diff_format=u Index: php-src/ext/sysvshm/sysvshm.c diff -u php-src/ext/sysvshm/sysvshm.c:1.87 php-src/ext/sysvshm/sysvshm.c:1.88 --- php-src/ext/sysvshm/sysvshm.c:1.87 Tue Mar 17 23:22:05 2009 +++ php-src/ext/sysvshm/sysvshm.c Thu Mar 19 23:11:54 2009 @@ -16,7 +16,7 @@ +--+ */ -/* $Id: sysvshm.c,v 1.87 2009/03/17 23:22:05 iliaa Exp $ */ +/* $Id: sysvshm.c,v 1.88 2009/03/19 23:11:54 iliaa Exp $ */ /* This has been built and tested on Linux 2.2.14 * @@ -357,7 +357,7 @@ long total_size; long shm_varpos; - total_size = ((long) (len + sizeof(sysvshm_chunk) - 1) / 4) * 4 + 4; /* 4-byte alligment */ + total_size = ((long) (len + sizeof(sysvshm_chunk) - 1) / sizeof(long)) * sizeof(long) + sizeof(long); /* long alligment */ if ((shm_varpos = php_check_shm_data(ptr, key)) 0) { php_remove_shm_data(ptr, shm_varpos); -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php