diff options
author | Felipe Pena <felipe@php.net> | 2011-06-17 02:00:20 +0000 |
---|---|---|
committer | Felipe Pena <felipe@php.net> | 2011-06-17 02:00:20 +0000 |
commit | f7ee12e9285c878df386470f6fc32e54da010234 (patch) | |
tree | 0faa98d67db2a2aeb790c090bd823fed64fd1f7a /ext/pdo_firebird | |
parent | ccae79a2c35a3a36566f128cad7f81c3e249ab5a (diff) | |
download | php-git-f7ee12e9285c878df386470f6fc32e54da010234.tar.gz |
- Fixed two "jump or move depends on uninitialised value"
Diffstat (limited to 'ext/pdo_firebird')
-rw-r--r-- | ext/pdo_firebird/firebird_driver.c | 1 | ||||
-rw-r--r-- | ext/pdo_firebird/firebird_statement.c | 2 |
2 files changed, 2 insertions, 1 deletions
diff --git a/ext/pdo_firebird/firebird_driver.c b/ext/pdo_firebird/firebird_driver.c index c154555637..d9c6112475 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 3d45f185e7..6dcd09c35a 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) |