[Evolution-hackers] [RFC] fix seg fault of evolution-data-server when adding default vcard
- From: "Zhai, Edwin" <edwin zhai intel com>
- To: evolution-hackers gnome org
- Cc: yocto yoctoproject org, "Zhai, Edwin" <edwin zhai intel com>
- Subject: [Evolution-hackers] [RFC] fix seg fault of evolution-data-server when adding default vcard
- Date: Wed, 27 Apr 2011 15:58:25 +0800
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/
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]