[Evolution-hackers] [PATCH] Fix a possible segfault
- From: Christoph Höger <choeger cs tu-berlin de>
- To: evolution-hackers gnome org
- Subject: [Evolution-hackers] [PATCH] Fix a possible segfault
- Date: Thu, 14 Jan 2010 15:18:25 +0100
I am not 100% sure on this one, but abrt reported a crash in line 203.
The value of mi was optimized out and there was no debugging info from
the causing function (in general abrt seems to be far away from really
usefull), but since mi _can_ be NULL here and the get_flags operation
derefernces this pointer without further checking, I guess this is the
correct solution.
Signed-off-by: Christoph Höger <choeger cs tu-berlin de>
---
camel/providers/local/camel-maildir-folder.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/camel/providers/local/camel-maildir-folder.c b/camel/providers/local/camel-maildir-folder.c
index d4c9912..c13207d 100644
--- a/camel/providers/local/camel-maildir-folder.c
+++ b/camel/providers/local/camel-maildir-folder.c
@@ -197,7 +197,7 @@ maildir_append_message (CamelFolder *folder, CamelMimeMessage *message, const Ca
/* add it to the summary/assign the uid, etc */
mi = camel_local_summary_add((CamelLocalSummary *)folder->summary, message, info, lf->changes, ex);
- if (camel_exception_is_set (ex))
+ if (!mi || camel_exception_is_set (ex))
goto check_changed;
if ((camel_message_info_flags (mi) & CAMEL_MESSAGE_ATTACHMENTS) && !camel_mime_message_has_attachment (message))
--
1.6.5.2
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]