Re: [PHP-CVS] cvs: php-src(PHP_5_3) /ext/pdo pdo_stmt.c

2008-12-12 Thread Nuno Lopes
I've commited a little fix to *printf() functions, so that they won't read past the specified length. Nuno - Original Message - It does not really read past it, but internally it does a strlen() on the %s argument, which is where the valgrind shows the message. Technically that

Re: [PHP-CVS] cvs: php-src(PHP_5_3) /ext/pdo pdo_stmt.c

2008-12-11 Thread Nuno Lopes
Modified files: (Branch: PHP_5_3) /php-src/ext/pdo pdo_stmt.c Log: Fixed a possible corruption inside PDOStatement::debugDumpParams() http://cvs.php.net/viewvc.cgi/php-src/ext/pdo/pdo_stmt.c?r1=1.118.2.38.2.24.2.39r2=1.118.2.38.2.24.2.40diff_format=u Index:

Re: [PHP-CVS] cvs: php-src(PHP_5_3) /ext/pdo pdo_stmt.c

2008-12-11 Thread Ilia Alshanetsky
The patch was already n 5.2, the issue is that the str (key) is not guaranteed to be NULL terminated (nor does it need to be), so when strlen() is attempted on top of it you could end up reading more data then necessary. On 11-Dec-08, at 10:43 AM, Nuno Lopes wrote: Modified files:

Re: [PHP-CVS] cvs: php-src(PHP_5_3) /ext/pdo pdo_stmt.c

2008-12-11 Thread Nuno Lopes
Weird.. Isn't that a bug in php_stream_printf() then? I would say it shouldn't read past the specified length.. otherwise the same bug may appear in other places. What do you think? Nuno - Original Message - The patch was already n 5.2, the issue is that the str (key) is not

Re: [PHP-CVS] cvs: php-src(PHP_5_3) /ext/pdo pdo_stmt.c

2008-12-11 Thread Ilia Alshanetsky
It does not really read past it, but internally it does a strlen() on the %s argument, which is where the valgrind shows the message. Technically that code needs to be reviewed, but just from general use case I think its safer not to pass non-terminated char pointers around. On 11-Dec-08,

Re: [PHP-CVS] cvs: php-src(PHP_5_3) /ext/pdo pdo_stmt.c

2008-10-24 Thread Felipe Pena
Hello Marcus, 2008/10/11 Marcus Boerger [EMAIL PROTECTED]: Hello Felipe, why did we not put that 'static' into the macro? marcus Friday, October 10, 2008, 9:35:34 PM, you wrote: felipe Fri Oct 10 19:35:34 2008 UTC Modified files: (Branch: PHP_5_3)

Re: [PHP-CVS] cvs: php-src(PHP_5_3) /ext/pdo pdo_stmt.c

2008-10-11 Thread Marcus Boerger
Hello Felipe, why did we not put that 'static' into the macro? marcus Friday, October 10, 2008, 9:35:34 PM, you wrote: felipe Fri Oct 10 19:35:34 2008 UTC Modified files: (Branch: PHP_5_3) /php-src/ext/pdopdo_stmt.c Log: - MFH: Static'fication

Re: [PHP-CVS] cvs: php-src(PHP_5_3) /ext/pdo pdo_stmt.c

2008-10-11 Thread Felipe Pena
Hello Marcus, Em Sáb, 2008-10-11 às 20:48 +0200, Marcus Boerger escreveu: Hello Felipe, why did we not put that 'static' into the macro? I think that would be nice. But will requires massive changes, as there is tons of code like that. Though it isn't an impediment. :) -- Regards,

Re: [PHP-CVS] cvs: php-src(PHP_5_3) /ext/pdo pdo_stmt.c /ext/phar phar.phar /main php_ini.c php_ini.h ZendEngine2 zend.c zend.h zend_API.c zend_API.h zend_compile.c zend_compile.h zend_constants.c zen

2008-08-13 Thread Pierre Joye
2008/8/12 Felipe Pena [EMAIL PROTECTED]: felipe Tue Aug 12 17:20:26 2008 UTC Modified files: (Branch: PHP_5_3) /ZendEngine2zend.c zend.h zend_API.c zend_API.h zend_compile.c zend_compile.h zend_constants.c zend_constants.h

Re: [PHP-CVS] cvs: php-src(PHP_5_3) /ext/pdo pdo_stmt.c /ext/phar phar.phar /main php_ini.c php_ini.h ZendEngine2 zend.c zend.h zend_API.c zend_API.h zend_compile.c zend_compile.h zend_constants.c zen

2008-08-13 Thread Felipe Pena
Em Qua, 2008-08-13 às 17:58 +0200, Pierre Joye escreveu: 2008/8/12 Felipe Pena [EMAIL PROTECTED]: felipe Tue Aug 12 17:20:26 2008 UTC Modified files: (Branch: PHP_5_3) /ZendEngine2zend.c zend.h zend_API.c zend_API.h zend_compile.c

RE: [PHP-CVS] cvs: php-src(PHP_5_3) /ext/pdo pdo_stmt.c

2007-11-20 Thread Dmitry Stogov
Hi Ilia, After this fix 39 PDO rleated test are failed for me :( SIGSEGV #0 0x083430e9 in _zend_is_inconsistent (ht=0x0, file=0x849721c /home/dmitry/php/php5.3/Zend/zend_hash.c, line=1015) at /home/dmitry/php/php5.3/Zend/zend_hash.c:53 #1 0x08345d73 in zend_hash_num_elements (ht=0x0)

Re: [PHP-CVS] cvs: php-src(PHP_5_3) /ext/pdo pdo_stmt.c

2007-11-20 Thread Antony Dovgal
On 21.11.2007 00:14, Dmitry Stogov wrote: Hi Ilia, After this fix 39 PDO rleated test are failed for me :( Confirmed. Pay attention to `ht` value here: (gdb) bt #0 0x008c0e87 in _zend_is_inconsistent (ht=0x0, file=0xc22098 /local/qa/5_3/Zend/zend_hash.c, line=1015) at

Re: [PHP-CVS] cvs: php-src(PHP_5_3) /ext/pdo pdo_stmt.c

2007-11-20 Thread Ilia Alshanetsky
I am looking into it now. On 20-Nov-07, at 4:21 PM, Antony Dovgal wrote: On 21.11.2007 00:14, Dmitry Stogov wrote: Hi Ilia, After this fix 39 PDO rleated test are failed for me :( Confirmed. Pay attention to `ht` value here: (gdb) bt #0 0x008c0e87 in _zend_is_inconsistent