summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorFelipe Pena <felipe@php.net>2011-06-17 02:00:20 (GMT)
committerFelipe Pena <felipe@php.net>2011-06-17 02:00:20 (GMT)
commita8cc93d54f5d04db81a4aa67abfa7049a526bf93 (patch)
tree5132000770f5945c2b71269177e2176cbab281a2
parent3c8bd9ebb68fbb6e82dfa8254f1081570aa44913 (diff)
downloadphp-a8cc93d54f5d04db81a4aa67abfa7049a526bf93.tar.gz
- Fixed two "jump or move depends on uninitialised value"
-rw-r--r--ext/pdo_firebird/firebird_driver.c1
-rw-r--r--ext/pdo_firebird/firebird_statement.c2
2 files changed, 2 insertions, 1 deletions
diff --git a/ext/pdo_firebird/firebird_driver.c b/ext/pdo_firebird/firebird_driver.c
index c154555..d9c6112 100644
--- a/ext/pdo_firebird/firebird_driver.c
+++ b/ext/pdo_firebird/firebird_driver.c
@@ -232,6 +232,7 @@ static long firebird_handle_doer(pdo_dbh_t *dbh, const char *sql, long sql_len T
/* 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)) {
diff --git a/ext/pdo_firebird/firebird_statement.c b/ext/pdo_firebird/firebird_statement.c
index 3d45f18..6dcd09c 100644
--- a/ext/pdo_firebird/firebird_statement.c
+++ b/ext/pdo_firebird/firebird_statement.c
@@ -191,7 +191,7 @@ static int firebird_stmt_describe(pdo_stmt_t *stmt, int colno TSRMLS_DC) /* {{{
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)