unixODBC/unixODBC-2.3.1-uninitialized.patch
2012-11-06 09:54:44 +00:00

26 lines
952 B
Diff

htbl_stmt hasn't yet been allocated in both cases
Index: Drivers/Postgre7.1/info.c
===================================================================
--- Drivers/Postgre7.1/info.c.orig
+++ Drivers/Postgre7.1/info.c
@@ -2345,6 +2345,7 @@ Int2 result_cols;
if(!stmt->result) {
SC_set_error(stmt, STMT_NO_MEMORY_ERROR, "Couldn't allocate memory for SQLForeignKeys result.");
SC_log_error(func, "", stmt);
+ PG__SQLFreeStmt(htbl_stmt, SQL_DROP);
return SQL_ERROR;
}
Index: Drivers/Postgre7.1/convert.c
===================================================================
--- Drivers/Postgre7.1/convert.c.orig
+++ Drivers/Postgre7.1/convert.c
@@ -223,6 +223,7 @@ struct tm tp;
memset(&st, 0, sizeof(SIMPLE_TIME));
+ 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) {