File r899975.diff of Package kdepim4

Subject: kmail: fix crash when clicking on one of the invitation action links
From: wstephenson@suse.de
Bug: 
Patch-upstream: 899975
--- plugins/kmail/bodypartformatter/text_vcard.cpp	(revision 899974)
+++ plugins/kmail/bodypartformatter/text_vcard.cpp	(revision 899975)
@@ -117,7 +117,7 @@ namespace {
        VCardConverter vcc;
        Addressee::List al = vcc.parseVCards( vCard.toUtf8() );
        int index = path.right( path.length() - path.lastIndexOf( ":" ) - 1 ).toInt();
-       if ( index == -1 ) return true;
+       if ( index == -1 || index >= al.count() ) return true;
        KABC::Addressee a = al[index];
        if ( a.isEmpty() ) return true;
        KPIM::KAddrBookExternal::addVCard( a, 0 );
Index: plugins/kmail/bodypartformatter/text_vcard.cpp
===================================================================
openSUSE Build Service is sponsored by