Created attachment 346893 [details] Proposed patch Description of problem: The "PRAGMA user_version" returns NULL as the column heading and that causes a segmentation fault in PHP Version-Release number of selected component (if applicable): sqlite-3.3.6-2 How reproducible: 100% reproducible Steps to Reproduce: 1. Install php and php-pdo # yum install php php-pdo 2. Prepare a test.php file that uses "PRAGMA user_version" $db = new PDO("sqlite:test.sqlite"); $r = $db->query("PRAGMA encoding"); echo "Current Encoding:".$r->fetchColumn()."\n"; $r->closeCursor(); $r = $db->query("PRAGMA user_version"); echo "Current User Version:".$r->fetchColumn()."\n"; $r->closeCursor(); 3. Run php test.php Actual results: $ php test.php Current Encoding:UTF-8 Segmentation fault (core dumped) Expected results: $ php test.php Current Encoding:UTF-8 Current User Version:0 Additional info: PHP crashes because "PRAGMA user_version" returns NULL as the column heading: $ sqlite3 SQLite version 3.3.6 Enter ".help" for instructions sqlite> .headers on sqlite> PRAGMA user_version; (null) 0 sqlite> This is bug #2143 upstream: http://www.sqlite.org/cvstrac/tktview?tn=2143 That was fixed with the Changeset #3560 http://www.sqlite.org/cvstrac/chngview?cn=3560 Applying the patch fixes the issue in sqlite: $ sqlite3 SQLite version 3.3.6 Enter ".help" for instructions sqlite> .headers on sqlite> PRAGMA user_version; user_version 0 sqlite> And PHP does not crash anymore.
This request was evaluated by Red Hat Product Management for inclusion, but this component is not scheduled to be updated in the current Red Hat Enterprise Linux release. If you would like this request to be reviewed for the next minor release, ask your support representative to set the next rhel-x.y flag to "?".
This request was evaluated by Red Hat Product Management for inclusion in the current release of Red Hat Enterprise Linux. Because the affected component is not scheduled to be updated in the current release, Red Hat is unfortunately unable to address this request at this time. Red Hat invites you to ask your support representative to propose this request, if appropriate and relevant, in the next release of Red Hat Enterprise Linux.
Since the problem described in this bug report should be resolved in a recent advisory, it has been closed with a resolution of ERRATA. For information on the advisory, and where to find the updated files, follow the link below. If the solution does not work for you, open a new bug report. http://rhn.redhat.com/errata/RHBA-2013-0063.html