svn: /php/php-src/ branches/PHP_5_3/ext/pdo_firebird/firebird_driver.c branches/PHP_5_3/ext/pdo_firebird/firebird_statement.c
branches/PHP_5_4/ext/pdo_firebird/firebird_driver.c branches/PHP_5_4/ext/pdo_firebird/firebird_statement.c trunk/ext/pdo_firebird/firebird_driver.c
trunk/ext/pdo_firebird/firebird_statement.c
| From: | Felipe Pena | Date: | Fri, 17 Jun 2011 02:00:20 +0000 |
| Subject: | svn: /php/php-src/ branches/PHP_5_3/ext/pdo_firebird/firebird_driver.c branches/PHP_5_3/ext/pdo_firebird/firebird_statement.c branches/PHP_5_4/ext/pdo_firebird/firebird_driver.c branches/PHP_5_4/ext/pdo_firebird/firebird_statement.c trunk/ext/pdo_firebird/firebird_driver.c trunk/ext/pdo_firebird/firebird_statement.c |
||
| Groups: | php.cvs | ||
| Request: | Send a blank email to php-cvs+get-65238@lists.php.net to get a copy of this message | ||
felipe Fri, 17 Jun 2011 02:00:20 +0000
Revision: http://svn.php.net/viewvc?view=revision&revision=312225
Log:
- Fixed two "jump or move depends on uninitialised value"
Changed paths:
U php/php-src/branches/PHP_5_3/ext/pdo_firebird/firebird_driver.c
U php/php-src/branches/PHP_5_3/ext/pdo_firebird/firebird_statement.c
U php/php-src/branches/PHP_5_4/ext/pdo_firebird/firebird_driver.c
U php/php-src/branches/PHP_5_4/ext/pdo_firebird/firebird_statement.c
U php/php-src/trunk/ext/pdo_firebird/firebird_driver.c
U php/php-src/trunk/ext/pdo_firebird/firebird_statement.c
Modified: php/php-src/branches/PHP_5_3/ext/pdo_firebird/firebird_driver.c
===================================================================
--- php/php-src/branches/PHP_5_3/ext/pdo_firebird/firebird_driver.c 2011-06-17 00:30:50 UTC (rev
312224)
+++ php/php-src/branches/PHP_5_3/ext/pdo_firebird/firebird_driver.c 2011-06-17 02:00:20 UTC (rev
312225)
@@ -232,6 +232,7 @@
/* TODO no placeholders in exec() for now */
in_sqlda.version = out_sqlda.version = PDO_FB_SQLDA_VERSION;
in_sqlda.sqld = out_sqlda.sqld = 0;
+ out_sqlda.sqln = 1;
/* allocate and prepare statement */
if (!firebird_alloc_prepare_stmt(dbh, sql, sql_len, &out_sqlda, &stmt, 0 TSRMLS_CC)) {
Modified: php/php-src/branches/PHP_5_3/ext/pdo_firebird/firebird_statement.c
===================================================================
--- php/php-src/branches/PHP_5_3/ext/pdo_firebird/firebird_statement.c 2011-06-17 00:30:50 UTC (rev
312224)
+++ php/php-src/branches/PHP_5_3/ext/pdo_firebird/firebird_statement.c 2011-06-17 02:00:20 UTC (rev
312225)
@@ -191,7 +191,7 @@
char *cp;
/* allocate storage for the column */
- var->sqlind = (void*)emalloc(var->sqllen + 2*sizeof(short));
+ var->sqlind = (void*)ecalloc(1, var->sqllen + 2*sizeof(short));
var->sqldata = &((char*)var->sqlind)[sizeof(short)];
colname_len = (S->H->fetch_table_names && var->relname_length)
Modified: php/php-src/branches/PHP_5_4/ext/pdo_firebird/firebird_driver.c
===================================================================
--- php/php-src/branches/PHP_5_4/ext/pdo_firebird/firebird_driver.c 2011-06-17 00:30:50 UTC (rev
312224)
+++ php/php-src/branches/PHP_5_4/ext/pdo_firebird/firebird_driver.c 2011-06-17 02:00:20 UTC (rev
312225)
@@ -232,6 +232,7 @@
/* TODO no placeholders in exec() for now */
in_sqlda.version = out_sqlda.version = PDO_FB_SQLDA_VERSION;
in_sqlda.sqld = out_sqlda.sqld = 0;
+ out_sqlda.sqln = 1;
/* allocate and prepare statement */
if (!firebird_alloc_prepare_stmt(dbh, sql, sql_len, &out_sqlda, &stmt, 0 TSRMLS_CC)) {
Modified: php/php-src/branches/PHP_5_4/ext/pdo_firebird/firebird_statement.c
===================================================================
--- php/php-src/branches/PHP_5_4/ext/pdo_firebird/firebird_statement.c 2011-06-17 00:30:50 UTC (rev
312224)
+++ php/php-src/branches/PHP_5_4/ext/pdo_firebird/firebird_statement.c 2011-06-17 02:00:20 UTC (rev
312225)
@@ -191,7 +191,7 @@
char *cp;
/* allocate storage for the column */
- var->sqlind = (void*)emalloc(var->sqllen + 2*sizeof(short));
+ var->sqlind = (void*)ecalloc(1, var->sqllen + 2*sizeof(short));
var->sqldata = &((char*)var->sqlind)[sizeof(short)];
colname_len = (S->H->fetch_table_names && var->relname_length)
Modified: php/php-src/trunk/ext/pdo_firebird/firebird_driver.c
===================================================================
--- php/php-src/trunk/ext/pdo_firebird/firebird_driver.c 2011-06-17 00:30:50 UTC (rev 312224)
+++ php/php-src/trunk/ext/pdo_firebird/firebird_driver.c 2011-06-17 02:00:20 UTC (rev 312225)
@@ -232,6 +232,7 @@
/* TODO no placeholders in exec() for now */
in_sqlda.version = out_sqlda.version = PDO_FB_SQLDA_VERSION;
in_sqlda.sqld = out_sqlda.sqld = 0;
+ out_sqlda.sqln = 1;
/* allocate and prepare statement */
if (!firebird_alloc_prepare_stmt(dbh, sql, sql_len, &out_sqlda, &stmt, 0 TSRMLS_CC)) {
Modified: php/php-src/trunk/ext/pdo_firebird/firebird_statement.c
===================================================================
--- php/php-src/trunk/ext/pdo_firebird/firebird_statement.c 2011-06-17 00:30:50 UTC (rev 312224)
+++ php/php-src/trunk/ext/pdo_firebird/firebird_statement.c 2011-06-17 02:00:20 UTC (rev 312225)
@@ -191,7 +191,7 @@
char *cp;
/* allocate storage for the column */
- var->sqlind = (void*)emalloc(var->sqllen + 2*sizeof(short));
+ var->sqlind = (void*)ecalloc(1, var->sqllen + 2*sizeof(short));
var->sqldata = &((char*)var->sqlind)[sizeof(short)];
colname_len = (S->H->fetch_table_names && var->relname_length)