unixODBC/unixODBC-2.2.12-uninitialized.patch

30 lines
898 B
Diff

htbl_stmt hasn't yet been allocated in both cases
--- Drivers/PostgreSQL/info.c
+++ Drivers/PostgreSQL/info.c
@@ -2043,7 +2043,6 @@
stmt->errormsg = "No Table specified to SQLPrimaryKeys.";
stmt->errornumber = STMT_INTERNAL_ERROR;
SC_log_error(func, "", stmt);
- PG__SQLFreeStmt(htbl_stmt, SQL_DROP);
return SQL_ERROR;
}
@@ -2228,7 +2227,6 @@
stmt->errormsg = "Couldn't allocate memory for SQLForeignKeys result.";
stmt->errornumber = STMT_NO_MEMORY_ERROR;
SC_log_error(func, "", stmt);
- PG__SQLFreeStmt(htbl_stmt, SQL_DROP);
return SQL_ERROR;
}
--- Drivers/PostgreSQL/convert.c
+++ Drivers/PostgreSQL/convert.c
@@ -178,6 +178,7 @@
}
+ memset(&st, 0, sizeof(SIMPLE_TIME));
mylog("copy_and_convert: field_type = %d, fctype = %d, value = '%s', cbValueMax=%d\n", field_type, fCType, (value==NULL)?"<NULL>":value, cbValueMax);
if ( ! value) {