|  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #67919 zend_mm_heap corrupted when a bound out parameter preset to a constant
Submitted: 2014-08-27 18:15 UTC Modified: -
Avg. Score:3.5 ± 0.5
Reproduced:2 of 2 (100.0%)
Same Version:0 (0.0%)
Same OS:2 (100.0%)
From: pm at datasphere dot ch Assigned:
Status: Open Package: PDO ODBC
PHP Version: 5.5.16 OS: Linux
Private report: No CVE-ID: None
View Add Comment Developer Edit
Anyone can comment on a bug. Have a simpler test case? Does it work for you on a different platform? Let us know!
Just going to say 'Me too!'? Don't clutter the database with that please — but make sure to vote on the bug!
Your email address:
Solve the problem:
18 + 41 = ?
Subscribe to this entry?

 [2014-08-27 18:15 UTC] pm at datasphere dot ch
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:
	try {
		$conn = new PDO("odbc:<yourdatabaseDSN>");
	catch (PDOException $e) {
		print "Error!: " . $e->getMessage() . "\n";

	/* 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";


Expected result:
Proper execution and normal program exit

Actual result:
zend_mm_heap corrupted


pdorealloc (last revision 2014-08-27 18:18 UTC by pm at datasphere dot ch)

Add a Patch

Pull Requests

Add a Pull Request

PHP Copyright © 2001-2020 The PHP Group
All rights reserved.
Last updated: Tue Jan 28 05:01:24 2020 UTC