[Kde-pim] [patch] proposed fix for CID:3969 (kdepimlibs/kcal/icaltimezones.cpp)
Brad Hards
bradh at frogmouth.net
Thu Jan 1 05:45:12 GMT 2009
Apparently KTimezone::data() can return 0 (e.g. if !isValid()), in which case
ICalTimeZone::update() will dereference a null pointer.
Is this fix OK, or am I missing something?
Brad
*** kdepimlibs/kcal/icaltimezones.cpp (revision 902040)
--- kdepimlibs/kcal/icaltimezones.cpp (working copy)
***************
*** 268,279 ****
--- 268,283 ----
bool ICalTimeZone::update( const ICalTimeZone &other )
{
if ( !updateBase( other ) ) {
return false;
}
+ if ( !other.data() ) {
+ return false;
+ }
+
setData( other.data()->clone(), other.source() );
return true;
}
ICalTimeZone ICalTimeZone::utc()
{
_______________________________________________
KDE PIM mailing list kde-pim at kde.org
https://mail.kde.org/mailman/listinfo/kde-pim
KDE PIM home page at http://pim.kde.org/
More information about the kde-pim
mailing list