Bug #61212 [Opn->Csd]: PDO ODBC Segfaults on SQL_SUCESS_WITH_INFO
Edit report at https://bugs.php.net/bug.php?id=61212&edit=1
ID: 61212
Updated by: iliaa@php.net
Reported by: anilvarghese25 at gmail dot com
Summary: PDO ODBC Segfaults on SQL_SUCESS_WITH_INFO
-Status: Open
+Status: Closed
Type: Bug
Package: PDO related
Operating System: Linux
PHP Version: 5.3.10
-Assigned To:
+Assigned To: iliaa
Block user comment: N
Private report: N
New Comment:
This bug has been fixed in SVN.
Snapshots of the sources are packaged every three hours; this change
will be in the next snapshot. You can grab the snapshot at
http://snaps.php.net/.
For Windows:
http://windows.php.net/snapshots/
Thank you for the report, and for helping us make PHP better.
Previous Comments:
------------------------------------------------------------------------
[2012-03-14 20:20:23] iliaa@php.net
Automatic comment from SVN on behalf of iliaa
Revision: http://svn.php.net/viewvc/?view=revision&revision=324251
Log: Fixed bug #61212 (PDO ODBC Segfaults on SQL_SUCESS_WITH_INFO).
------------------------------------------------------------------------
[2012-02-29 19:21:14] anilvarghese25 at gmail dot com
Description:
------------
PDO ODBC segfaults when a column less than 256 bytes are retrieved (has to be SUCCESS_WITH_INFO).
The buffer is allocated with the assumption the retrieved column is greater than 256 bytes. When a
column with say 150 bytes are allocated, the code tries to write 256 bytes to the buffer and results
in a segfault.
The segfaults go away by ensuring the column length is checked before assigning characters to the
buffer.
Test script:
---------------
<requires a column coming from the db with a character encoding issue and length less than
256>
Expected result:
----------------
Should work regardless of the length of the column data
Actual result:
--------------
Segmentation Fault
------------------------------------------------------------------------
--
Edit this bug report at https://bugs.php.net/bug.php?id=61212&edit=1
Thread (2 messages)