* [RFC] fix seg fault of evolution-data-server when adding default vcard
@ 2011-04-27 7:58 Zhai, Edwin
0 siblings, 0 replies; only message in thread
From: Zhai, Edwin @ 2011-04-27 7:58 UTC (permalink / raw)
To: evolution-hackers; +Cc: yocto
This is one simple patch to fix seg fault of evolution-data-server,
when new contact is added for new created DB.
The root cause is simple: do_create (bf, XIMIAN_VCARD,....) would access
bf->priv->file_db and cause seg fault if not initialized.
I have created one bz https://bugzilla.gnome.org/show_bug.cgi?id=648736,
also attached patch for comments.
=====================================
Adding default vcard for new created DB always failed with seg fault, as
file_db was not initialized before access. This patch fix it.
Signed-off-by: Edwin Zhai <edwin.zhai@intel.com>
Index:
evolution-data-server/addressbook/backends/file/e-book-backend-file.c
===================================================================
---
evolution-data-server.orig/addressbook/backends/file/e-book-backend-file.c
2011-04-26 15:46:03.000000000 +0800
+++
evolution-data-server/addressbook/backends/file/e-book-backend-file.c
2011-04-26 15:59:13.000000000 +0800
@@ -1247,6 +1247,8 @@
#ifdef CREATE_DEFAULT_VCARD
EContact *contact = NULL;
+ /* Initialize file_db, or else following do_create
cause seg fault */
+ bf->priv->file_db = db;
if (!do_create (bf, XIMIAN_VCARD, &contact, NULL))
g_warning ("Cannot create default contact");
if (contact)
------------------------
Yocto Project @
http://www.yoctoproject.org/
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2011-04-27 7:58 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-04-27 7:58 [RFC] fix seg fault of evolution-data-server when adding default vcard Zhai, Edwin
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.