ZF-12316: Zend_Db_Statement::_stripQuoted() will cause "Segmentation fault" when one sql field length exceed 10000

Issue Type: Bug Created: 2012-07-03T09:03:48.000+0000 Last Updated: 2012-07-03T09:07:13.000+0000 Status: Open Fix version(s): Reporter: He GuangYu (heguangyu5) Assignee: Ralph Schindler (ralph) Tags: - Zend_Db

Related issues: Attachments:


The sql bellow will cause php "Segmentation fault", my php version is 5.3.2, and ZF version is 1.11.11

'', 'username' => 'root', 'password' => '123456', 'dbname' => 'test' )); $text = str\_pad('a', 10000, 'a'); $sql = "INSERT INTO faketable(fake\_id, fake\_field) VALUES(1, '$text')"; $stmt = new Zend\_Db\_Statement\_Pdo($dbAdapter, $sql); ?> Zend\_Db\_Statement::\_stripQuoted() use preg\_replace, and the regex cause this, but i don't know how to fix this.


Posted by He GuangYu (heguangyu5) on 2012-07-03T09:07:13.000+0000

i found this when i user $db->query() to insert multi rows one time.

$sql = 'INSERT INTO table(field_1, field_2) VALUES (val1, val2), (val3, val4), (val5, val6)'; $db->query($sql);

Have you found an issue?

See the Overview section for more details.


© 2006-2018 by Zend, a Rogue Wave Company. Made with by awesome contributors.

This website is built using zend-expressive and it runs on PHP 7.