[gnumeric] dependents: fix memset.



commit 1026958cb95ea70867ee25aeb36b7e083b73ee96
Author: Morten Welinder <terra gnome org>
Date:   Wed Jun 16 10:36:34 2010 -0400

    dependents: fix memset.

 ChangeLog       |    5 +++++
 NEWS            |    1 +
 src/dependent.c |    2 +-
 3 files changed, 7 insertions(+), 1 deletions(-)
---
diff --git a/ChangeLog b/ChangeLog
index 5f1f542..623dc63 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+2010-06-16  Morten Welinder  <terra gnome org>
+
+	* src/dependent.c (dependent_managed_init): Zero the right amount
+	of data.
+
 2010-06-16 Andreas J. Guelzow <aguelzow pyrshep ca>
 
 	* configure.in: check for gtk_widget_get_allocation
diff --git a/NEWS b/NEWS
index 07f343b..683f8cc 100644
--- a/NEWS
+++ b/NEWS
@@ -44,6 +44,7 @@ Morten:
 	* Improve BINOM.DIST.RANGE.
 	* Modernize STEYX.
 	* Plug evaluation leak.
+	* Fix memory handling issue for dependents.
 
 --------------------------------------------------------------------------
 Gnumeric 1.10.5
diff --git a/src/dependent.c b/src/dependent.c
index 0b12b90..6f5c644 100644
--- a/src/dependent.c
+++ b/src/dependent.c
@@ -1253,7 +1253,7 @@ workbook_unlink_3d_dep (GnmDependent *dep)
 void
 dependent_managed_init (GnmDependent *dep, Sheet *sheet)
 {
-	memset (dep, 0, sizeof (dep));
+	memset (dep, 0, sizeof (*dep));
 	dep->flags = DEPENDENT_MANAGED;
 	dep->sheet = sheet;
 }



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