From 833b8636a3dc41e6144f5082f89e21bbe41258e3 Mon Sep 17 00:00:00 2001 From: JP Rosevear Date: Tue, 17 Jul 2001 21:36:14 +0000 Subject: do not strdup a NULL (valid) timezone 2001-07-17 JP Rosevear * src/libical/icaltimezone.c (icaltimezone_get_tznames_from_vtimezone): do not strdup a NULL (valid) timezone svn path=/trunk/; revision=11180 --- libical/ChangeLog | 18 +++++++++++++----- libical/src/libical/icaltimezone.c | 2 +- 2 files changed, 14 insertions(+), 6 deletions(-) (limited to 'libical') diff --git a/libical/ChangeLog b/libical/ChangeLog index 5b5990baf9..4d27222e5e 100644 --- a/libical/ChangeLog +++ b/libical/ChangeLog @@ -1,13 +1,21 @@ +2001-07-17 JP Rosevear + + * src/libical/icaltimezone.c + (icaltimezone_get_tznames_from_vtimezone): do not strdup a NULL + (valid) timezone + 2001-07-16 Damon Chaplin - * src/libical/icaltimezone.c (icaltimezone_get_location_from_vtimezone): return NULL if we couldn't find the LOCATION. + * src/libical/icaltimezone.c + (icaltimezone_get_location_from_vtimezone): return NULL if we + couldn't find the LOCATION. (icaltimezone_get_utc_offset): ifdef'd out a debugging message. - (icaltimezone_get_location): - (icaltimezone_get_latitude): + (icaltimezone_get_location): + (icaltimezone_get_latitude): (icaltimezone_get_longitude): don't load the builtin timezone for these. We should already have the data from reading zones.tab. - (icaltimezone_get_builtin_timezone_from_tzid): return NULL if the TZID - given is NULL or "" (i.e. a floating time). + (icaltimezone_get_builtin_timezone_from_tzid): return NULL if the + TZID given is NULL or "" (i.e. a floating time). 2001-07-10 Peter Williams diff --git a/libical/src/libical/icaltimezone.c b/libical/src/libical/icaltimezone.c index eb2392414f..300ac7924e 100644 --- a/libical/src/libical/icaltimezone.c +++ b/libical/src/libical/icaltimezone.c @@ -414,7 +414,7 @@ icaltimezone_get_tznames_from_vtimezone (icalcomponent *component) /* If either of the TZNAMEs was found just return that, else NULL. */ tznames = standard_tzname ? standard_tzname : daylight_tzname; - return strdup (tznames); + return tznames ? strdup (tznames) : NULL; } } -- cgit