From ca0ac59661d235398a2d5c9c05287b570e5ae939 Mon Sep 17 00:00:00 2001 From: Johnny Jacob Date: Mon, 13 Apr 2009 10:34:42 +0000 Subject: BGO : 578685 : Copy string. Avoids SIGSEGV. svn path=/trunk/; revision=37520 --- widgets/misc/ChangeLog | 8 ++++++++ widgets/misc/e-attachment-bar.c | 3 +++ 2 files changed, 11 insertions(+) (limited to 'widgets/misc') diff --git a/widgets/misc/ChangeLog b/widgets/misc/ChangeLog index 2c3e6ef614..92d26c8333 100644 --- a/widgets/misc/ChangeLog +++ b/widgets/misc/ChangeLog @@ -1,3 +1,11 @@ +2009-04-13 Johnny Jacob + + ** Fixes #578685 – evolution crashed with SIGSEGV. + + ** Patch by Takao Fujiwara + + * e-attachment-bar.c (update): Copy string. Avoids SIGSEGV. + 2009-03-09 Chenthill Palanisamy * widgets/misc/e-calendar-item.c: Removed the string diff --git a/widgets/misc/e-attachment-bar.c b/widgets/misc/e-attachment-bar.c index de45861055..0210d21b46 100644 --- a/widgets/misc/e-attachment-bar.c +++ b/widgets/misc/e-attachment-bar.c @@ -442,6 +442,7 @@ update (EAttachmentBar *bar) } desc = camel_mime_part_get_description (attachment->body); + if (!desc || *desc == '\0') { if (attachment->file_name) { desc = g_filename_to_utf8 (attachment->file_name, -1, NULL, NULL, NULL); @@ -450,6 +451,8 @@ update (EAttachmentBar *bar) if (desc) desc = g_strdup (desc); } + } else { + desc = g_strdup (desc); } if (!desc) -- cgit v1.2.3