All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Zhai, Edwin" <edwin.zhai@intel.com>
To: evolution-hackers@gnome.org
Cc: yocto@yoctoproject.org
Subject: [RFC] fix seg fault of evolution-data-server when adding default vcard
Date: Wed, 27 Apr 2011 15:58:25 +0800	[thread overview]
Message-ID: <4DB7CCA1.5000500@intel.com> (raw)

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/



                 reply	other threads:[~2011-04-27  7:58 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=4DB7CCA1.5000500@intel.com \
    --to=edwin.zhai@intel.com \
    --cc=evolution-hackers@gnome.org \
    --cc=yocto@yoctoproject.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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.