[prev in list] [next in list] [prev in thread] [next in thread]
List: kmail-devel
Subject: [Bug 127095] kmail crashes when viewing mails with ics attachments
From: Martin Koller <m.koller () surfeu ! at>
Date: 2006-10-30 19:21:00
Message-ID: 20061030192100.6107.qmail () ktown ! kde ! org
[Download RAW message or body]
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.
http://bugs.kde.org/show_bug.cgi?id=127095
m.koller surfeu at changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|NEW |RESOLVED
Resolution| |FIXED
------- Additional Comments From m.koller surfeu at 2006-10-30 20:20 -------
SVN commit 600496 by mkoller:
BUG: 127095
BUG: 88840
When parsing an ATTACH;VALUE=URI: element, take care of casting
to the right datatype
M +15 -8 icalformatimpl.cpp
--- branches/KDE/3.5/kdepim/libkcal/icalformatimpl.cpp #600495:600496
@ -1183,19 +1183,26 @
Attachment *ICalFormatImpl::readAttachment(icalproperty *attach)
{
- icalattach *a = icalproperty_get_attach(attach);
-
Attachment *attachment = 0;
- int isurl = icalattach_get_is_url (a);
- if (isurl == 0)
- attachment = new Attachment((const char*)icalattach_get_data(a));
- else {
- attachment = new Attachment(QString(icalattach_get_url(a)));
+ icalvalue_kind value_kind = icalvalue_isa(icalproperty_get_value(attach));
+
+ if ( value_kind == ICAL_ATTACH_VALUE ) {
+ icalattach *a = icalproperty_get_attach(attach);
+
+ int isurl = icalattach_get_is_url (a);
+ if (isurl == 0)
+ attachment = new Attachment((const char*)icalattach_get_data(a));
+ else {
+ attachment = new Attachment(QString(icalattach_get_url(a)));
+ }
}
+ else if ( value_kind == ICAL_URI_VALUE ) {
+ attachment = new Attachment(QString(icalvalue_get_uri(icalproperty_get_value(attach))));
+ }
icalparameter *p = icalproperty_get_first_parameter(attach, ICAL_FMTTYPE_PARAMETER);
- if (p)
+ if (p && attachment)
attachment->setMimeType(QString(icalparameter_get_fmttype(p)));
return attachment;
_______________________________________________
KMail developers mailing list
KMail-devel@kde.org
https://mail.kde.org/mailman/listinfo/kmail-devel
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic