[libgda] posgres: Fix an out of bounds crash



commit 5254d6e14e525457edd4e519a3107f275b496ae4
Author: Murray Cumming <murrayc murrayc com>
Date:   Wed Oct 31 00:15:59 2012 +0100

    posgres: Fix an out of bounds crash

 providers/postgres/gda-postgres-handler-bin.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
---
diff --git a/providers/postgres/gda-postgres-handler-bin.c b/providers/postgres/gda-postgres-handler-bin.c
index 62d2218..67414bd 100644
--- a/providers/postgres/gda-postgres-handler-bin.c
+++ b/providers/postgres/gda-postgres-handler-bin.c
@@ -121,7 +121,7 @@ gda_postgres_handler_bin_init (GdaPostgresHandlerBin * hdl)
 	hdl->priv = g_new0 (GdaPostgresHandlerBinPriv, 1);
 	hdl->priv->detailed_descr = _("Postgresql binary handler");
 	hdl->priv->nb_g_types = 2;
-	hdl->priv->valid_g_types = g_new0 (GType, 1);
+	hdl->priv->valid_g_types = g_new0 (GType, hdl->priv->nb_g_types);
 	hdl->priv->valid_g_types[0] = GDA_TYPE_BINARY;
 	hdl->priv->valid_g_types[1] = GDA_TYPE_BLOB;
 



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]