[evolution-patches] Mail: Fix for unintialized local var in em-account-editor.c



Currently there's a potential crash in emae_option_checkspin for the
case where post is false and "label" inherits a non-NULL value from
whatever was on the stack before.

OK to commit this fix?

(CVS evolution seems to be gaining warnings, many of them significant.
What warning settings are people compiling with?)
? Evolution-Mail-common.c
? Evolution-Mail-skels.c
? Evolution-Mail-stubs.c
? Evolution-Mail.h
? evolution-mail-2.4.schemas
? mail.error
? default/zh_CN/Makefile
? default/zh_CN/Makefile.in
Index: ChangeLog
===================================================================
RCS file: /cvs/gnome/evolution/mail/ChangeLog,v
retrieving revision 1.3671
diff -u -p -r1.3671 ChangeLog
--- ChangeLog	2 Aug 2005 13:47:19 -0000	1.3671
+++ ChangeLog	2 Aug 2005 19:41:08 -0000
@@ -1,3 +1,8 @@
+2005-08-02  David Malcolm  <dmalcolm redhat com>
+
+	* em-account-editor.c:  (emae_option_checkspin) initialize local 
+	variable "label".
+
 2005-08-01  Shakti Sen <shprasad novell com>
 
 	* em-composer-prefs.c: Included 'gtkentry.h' to resolve the
Index: em-account-editor.c
===================================================================
RCS file: /cvs/gnome/evolution/mail/em-account-editor.c,v
retrieving revision 1.30
diff -u -p -r1.30 em-account-editor.c
--- em-account-editor.c	29 Jul 2005 06:16:15 -0000	1.30
+++ em-account-editor.c	2 Aug 2005 19:41:08 -0000
@@ -1869,7 +1869,7 @@ emae_option_checkspin_check_changed(GtkT
 static GtkWidget *
 emae_option_checkspin(EMAccountEditorService *service, CamelURL *url, const char *name, const char *fmt, const char *info)
 {
-	GtkWidget *hbox, *check, *spin, *label;
+	GtkWidget *hbox, *check, *spin, *label = NULL;
 	double min, def, max;
 	char *pre, *post;
 	const char *val;


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