[evolution-patches] [gtkhtml] Fix for Contact List and Tasks dump



Hi,

Please review the attached patch for the crash in evolution contacts and
tasks. The crash occurs even on a simple click on a contact item or
task.
The stack trace can be found at 
http://bugzilla.gnome.org/show_bug.cgi?id=270844

Thanks,
Kaushal
-- 
Kaushal Kumar <kakumar novell com>
Index: src/ChangeLog
===================================================================
RCS file: /cvs/gnome/gtkhtml/src/ChangeLog,v
retrieving revision 1.2136
diff -p -u -5 -r1.2136 ChangeLog
--- src/ChangeLog	8 Aug 2005 04:40:58 -0000	1.2136
+++ src/ChangeLog	12 Aug 2005 16:03:48 -0000
@@ -1,5 +1,13 @@
+2005-08-12  Kaushal Kumar  <kakumar novell com>
+
+	* gtkhtml-stream.c (gtk_html_stream_vprintf): Use g_strdup_vprintf instead of 
+	g_printf_string_upper_bound since the latter returns incorrect values. 
+
+	Fixes tasks and contact list dump in evolution.
+	Fix bug #270844.
+
 2005-08-05  Kaushal Kumar  <kakumar novell com>
 
 	* htmlengine-edit.c (html_engine_get_insert_level_for_object): Advance clue 
 	to next level to fix infinite looping for cursor level. 
 
Index: src/gtkhtml-stream.c
===================================================================
RCS file: /cvs/gnome/gtkhtml/src/gtkhtml-stream.c,v
retrieving revision 1.10
diff -p -u -5 -r1.10 gtkhtml-stream.c
--- src/gtkhtml-stream.c	20 Jan 2005 13:33:18 -0000	1.10
+++ src/gtkhtml-stream.c	12 Aug 2005 16:03:53 -0000
@@ -22,10 +22,11 @@
 #include <config.h>
 #include <stdio.h>
 #include <sys/types.h>
 #include <glib.h>
 #include <stdlib.h>
+#include <string.h>
 
 #include "gtkhtml-compat.h"
 #include "gtkhtml-stream.h"
 
 
@@ -84,15 +85,18 @@ gtk_html_stream_vprintf (GtkHTMLStream *
 			 va_list ap)
 {
 	size_t len;
 	char *buf = NULL;
 	char *mbuf = NULL;
+	char *tmp_buf = NULL;
 	int rv;
 	va_list ap_copy;
 
 	G_VA_COPY (ap_copy, ap);
-	len = g_printf_string_upper_bound (format, ap_copy);
+	tmp_buf = g_strdup_vprintf (format, ap_copy);
+	len = strlen (tmp_buf);
+	g_free (tmp_buf);
 
 	if (len < 8192)
 		buf = alloca (len);
 
 	if (buf == NULL)


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