Fix application crashes caused by nonstandard ical files.

Reported by: Anish Mistry <mistry.7@osu.edu>
Approved by: portmgr (linimon)
This commit is contained in:
Michael Nottebrock 2006-03-15 10:40:56 +00:00
parent 0a4fa21bc3
commit d8716f1a90
Notes: svn2git 2021-03-31 03:12:20 +00:00
svn path=/head/; revision=157208
6 changed files with 81 additions and 3 deletions

View file

@ -7,7 +7,7 @@
PORTNAME= kdepim
PORTVERSION= ${KDE_VERSION}
PORTREVISION= 1
PORTREVISION= 2
CATEGORIES= deskutils mail news palm kde
MASTER_SITES= ${MASTER_SITE_KDE}
MASTER_SITE_SUBDIR= stable/${PORTVERSION:S/.0//}/src

View file

@ -0,0 +1,26 @@
--- libkcal/libical/src/libicalss/icalclassify.c.orig Mon Oct 10 17:02:27 2005
+++ libkcal/libical/src/libicalss/icalclassify.c Tue Mar 14 14:58:48 2006
@@ -221,7 +221,10 @@
p = icalcomponent_get_first_property(inner,ICAL_ORGANIZER_PROPERTY);
if(p!=0){
- parts->organizer = strdup(icalproperty_get_organizer(p));
+ const char *p_organizer = icalproperty_get_organizer(p);
+ if (p_organizer!=0) {
+ parts->organizer = strdup(p_organizer);
+ }
}
p = icalcomponent_get_first_property(inner,ICAL_SEQUENCE_PROPERTY);
@@ -231,7 +234,10 @@
p = icalcomponent_get_first_property(inner,ICAL_UID_PROPERTY);
if(p!=0){
- parts->uid = strdup(icalproperty_get_uid(p));
+ const char *p_uid = icalproperty_get_uid(p);
+ if (p_uid!=0) {
+ parts->uid = strdup(p_uid);
+ }
}
p = icalcomponent_get_first_property(inner,ICAL_RECURRENCEID_PROPERTY);

View file

@ -7,7 +7,7 @@
PORTNAME= kdepim
PORTVERSION= ${KDE_VERSION}
PORTREVISION= 1
PORTREVISION= 2
CATEGORIES= deskutils mail news palm kde
MASTER_SITES= ${MASTER_SITE_KDE}
MASTER_SITE_SUBDIR= stable/${PORTVERSION:S/.0//}/src

View file

@ -0,0 +1,26 @@
--- libkcal/libical/src/libicalss/icalclassify.c.orig Mon Oct 10 17:02:27 2005
+++ libkcal/libical/src/libicalss/icalclassify.c Tue Mar 14 14:58:48 2006
@@ -221,7 +221,10 @@
p = icalcomponent_get_first_property(inner,ICAL_ORGANIZER_PROPERTY);
if(p!=0){
- parts->organizer = strdup(icalproperty_get_organizer(p));
+ const char *p_organizer = icalproperty_get_organizer(p);
+ if (p_organizer!=0) {
+ parts->organizer = strdup(p_organizer);
+ }
}
p = icalcomponent_get_first_property(inner,ICAL_SEQUENCE_PROPERTY);
@@ -231,7 +234,10 @@
p = icalcomponent_get_first_property(inner,ICAL_UID_PROPERTY);
if(p!=0){
- parts->uid = strdup(icalproperty_get_uid(p));
+ const char *p_uid = icalproperty_get_uid(p);
+ if (p_uid!=0) {
+ parts->uid = strdup(p_uid);
+ }
}
p = icalcomponent_get_first_property(inner,ICAL_RECURRENCEID_PROPERTY);

View file

@ -7,7 +7,7 @@
PORTNAME= kdepim
PORTVERSION= ${KDE_VERSION}
PORTREVISION= 1
PORTREVISION= 2
CATEGORIES= deskutils mail news palm kde
MASTER_SITES= ${MASTER_SITE_KDE}
MASTER_SITE_SUBDIR= stable/${PORTVERSION:S/.0//}/src

View file

@ -0,0 +1,26 @@
--- libkcal/libical/src/libicalss/icalclassify.c.orig Mon Oct 10 17:02:27 2005
+++ libkcal/libical/src/libicalss/icalclassify.c Tue Mar 14 14:58:48 2006
@@ -221,7 +221,10 @@
p = icalcomponent_get_first_property(inner,ICAL_ORGANIZER_PROPERTY);
if(p!=0){
- parts->organizer = strdup(icalproperty_get_organizer(p));
+ const char *p_organizer = icalproperty_get_organizer(p);
+ if (p_organizer!=0) {
+ parts->organizer = strdup(p_organizer);
+ }
}
p = icalcomponent_get_first_property(inner,ICAL_SEQUENCE_PROPERTY);
@@ -231,7 +234,10 @@
p = icalcomponent_get_first_property(inner,ICAL_UID_PROPERTY);
if(p!=0){
- parts->uid = strdup(icalproperty_get_uid(p));
+ const char *p_uid = icalproperty_get_uid(p);
+ if (p_uid!=0) {
+ parts->uid = strdup(p_uid);
+ }
}
p = icalcomponent_get_first_property(inner,ICAL_RECURRENCEID_PROPERTY);