Index: ChangeLog
===================================================================
--- ChangeLog	(revisjon 7593)
+++ ChangeLog	(arbeidskopi)
@@ -1,3 +1,9 @@
+2007-01-26  Kjartan Maraas  <kmaraas@gnome.org>
+
+	* camel-object.c: (cobject_state_write): Add more casts
+	to avoid allocating huge amounts of memory on some archs.
+	Patch from Joe Marcus Clarke. Bug #331099.
+
 2006-01-08  Veerapuram Varadhan  <vvaradhan@novell.com>
 
 	** Fixes eds part of bgo #362638 - Patch submitted by Matthew
Index: camel-object.c
===================================================================
--- camel-object.c	(revisjon 7590)
+++ camel-object.c	(arbeidskopi)
@@ -537,8 +537,8 @@ cobject_state_write(CamelObject *obj, FI
 
 	count = g_slist_length(props);
 
-	arggetv = g_malloc0(sizeof(*arggetv) + (count - CAMEL_ARGV_MAX) * sizeof(arggetv->argv[0]));
-	argv = g_malloc0(sizeof(*argv) + (count - CAMEL_ARGV_MAX) * sizeof(argv->argv[0]));
+	arggetv = g_malloc0((gulong)sizeof(*arggetv) + (count - CAMEL_ARGV_MAX) * sizeof(arggetv->argv[0]));
+	argv = g_malloc0((gulong)sizeof(*argv) + (count - CAMEL_ARGV_MAX) * sizeof(argv->argv[0]));
 	l = props;
 	i = 0;
 	while (l) {
