File r892930_kcal_libical_assert_bad_input.diff of Package kdepimlibs4

Index: kcal/icalformat_p.cpp
===================================================================
--- kcal/icalformat_p.cpp	(revision 892764)
+++ kcal/icalformat_p.cpp	(working copy)
@@ -1213,6 +1213,12 @@
 
 Attendee *ICalFormatImpl::readAttendee( icalproperty *attendee )
 {
+  // the following is a hack to support broken calendars (like WebCalendar 1.0.x)
+  // that include non-RFC-compliant attendees.  Otherwise libical 0.42 asserts.
+  if ( !icalproperty_get_value( attendee ) ) {
+    return 0;
+  }
+
   icalparameter *p = 0;
 
   QString email = QString::fromUtf8( icalproperty_get_attendee( attendee ) );
Index: kcal/incidencebase.cpp
===================================================================
--- kcal/incidencebase.cpp	(revision 892764)
+++ kcal/incidencebase.cpp	(working copy)
@@ -354,7 +354,7 @@
 
 void IncidenceBase::addAttendee( Attendee *a, bool doupdate )
 {
-  if ( mReadOnly ) {
+  if ( !a || mReadOnly ) {
     return;
   }
 
openSUSE Build Service is sponsored by