- Fixed two "jump or move depends on uninitialised value"

This commit is contained in:
Felipe Pena 2011-06-17 02:00:20 +00:00
parent 104cd28e95
commit 0a7292087c
2 changed files with 2 additions and 1 deletions

View File

@ -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)) {

View File

@ -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)