Bug #67919 [Opn->Fbk]: zend_mm_heap corrupted when a bound out parameter preset to a constant
| From: | cmb@php.net | Date: | Tue, 07 Apr 2020 09:34:45 +0000 |
| Subject: | Bug #67919 [Opn->Fbk]: zend_mm_heap corrupted when a bound out parameter preset to a constant | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-226448@lists.php.net to get a copy of this message | ||
Edit report at https://bugs.php.net/bug.php?id=67919&edit=1
ID: 67919
Updated by: cmb@php.net
Reported by: pm at datasphere dot ch
Summary: zend_mm_heap corrupted when a bound out parameter
preset to a constant
-Status: Open
+Status: Feedback
Type: Bug
Package: PDO ODBC
Operating System: Linux
PHP Version: 5.5.16
-Assigned To:
+Assigned To: cmb
Block user comment: N
Private report: N
New Comment:
This issue appears is fixed as of PHP 7.0.0 (commit 8210b3b[1]).
Or can you still reproduce it?
[1] <http://git.php.net/?p=php-src.git;a=commit;h=8210b3b8c470ec91bee89bad4d34c482aab13406>
Previous Comments:
------------------------------------------------------------------------
[2014-08-27 18:15:08] pm at datasphere dot ch
Description:
------------
When a out/inout bound parameter is set to a string constant before executing a prepared executed
statement, a call to erealloc() on it fails.
Test script:
---------------
<?php
try {
$conn = new PDO("odbc:<yourdatabaseDSN>");
}
catch (PDOException $e) {
print "Error!: " . $e->getMessage() . "\n";
die();
}
/* Adjust the SQL statement below to your test environment. */
$stmt = $conn->prepare("CALL LIBRARY.GETDB(? , ?)");
$intvalue = 10;
$strvalue = "abc";
$stmt->bindParam(1, $intvalue, PDO::PARAM_INT|PDO::PARAM_INPUT_OUTPUT, 4);
$stmt->bindParam(2, $strvalue, PDO::PARAM_STR|PDO::PARAM_INPUT_OUTPUT, 100);
print "before execute\n";
$res = $stmt->execute();
print "after execute\n";
var_dump($intvalue);
var_dump($strvalue);
?>
Expected result:
----------------
Proper execution and normal program exit
Actual result:
--------------
zend_mm_heap corrupted
------------------------------------------------------------------------
--
Edit this bug report at https://bugs.php.net/bug.php?id=67919&edit=1