Bug #65952 [Fbk->NoF]: Invalid buffer position in Prepared Statement
| From: | php-bugs at lists dot php dot net | Date: | Sun, 11 Oct 2020 04:22:09 +0000 |
| Subject: | Bug #65952 [Fbk->NoF]: Invalid buffer position in Prepared Statement | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-229528@lists.php.net to get a copy of this message | ||
Edit report at https://bugs.php.net/bug.php?id=65952&edit=1
ID: 65952
Updated by: php-bugs@lists.php.net
Reported by: wils dot solutions at gmail dot com
Summary: Invalid buffer position in Prepared Statement
-Status: Feedback
+Status: No Feedback
Type: Bug
Package: PDO ODBC
Operating System: Centos6
PHP Version: 5.4.21
Assigned To: cmb
Private report: N
New Comment:
No feedback was provided. The bug is being suspended because
we assume that you are no longer experiencing the problem.
If this is not the case and you are able to provide the
information that was requested earlier, please do so and
change the status of the bug back to "Re-Opened". Thank you.
Previous Comments:
------------------------------------------------------------------------
[2020-09-28 14:04:40] cmb@php.net
Can anybody reproduce this with any of the actively supported PHP
versions[1]?
[1] <https://www.php.net/supported-versions.php>
------------------------------------------------------------------------
[2013-10-23 15:36:45] wils dot solutions at gmail dot com
Description:
------------
I was trying to use PDO_ODBC with HP Vertica but it returns the "Invalid buffer position"
error.
I don't have this problem using ODBC Functions and I am using it now instead of PDO_ODBC but
decided to report the issue anyways...
By looking at the ODBC trace files, I see that when pdo_odbc binds parameter, it always sets the
BufferLength argument of the SQLBindParameter() function to 0. I believe this is wrong, since the
input is a character type, and as a result there is a buffer overrun.
Test script:
---------------
$query = "select * from category where name = :nome";
$sth = $this->_lnk->prepare($query);
$category = 'Hardcore';
$sth->bindParam(':nome', $category);
$sth->execute();
Expected result:
----------------
The query result
Actual result:
--------------
Fails with error:
Fatal error: Uncaught exception 'PDOException' with message 'SQLSTATE[HY000]: General
error: 50240 [Vertica][Support] (50240) Invalid buffer position. (SQLExecute[50240] at
/builddir/build/BUILD/php-5.4.21/ext/pdo_odbc/odbc_stmt.c:254)' in
/admin_vertica_report.class.php on line 39
------------------------------------------------------------------------
--
Edit this bug report at https://bugs.php.net/bug.php?id=65952&edit=1