Addressbook: Fix possible read of uninitialized data
EPhoneNumberCountrySource source;
country_code = e_phone_number_get_country_code (number, &source);
if (source == E_PHONE_NUMBER_COUNTRY_FROM_DEFAULT) country_code = 0;
and e_phone_number_get_country_code is implemented as
gint
e_phone_number_get_country_code (const EPhoneNumber *phone_number,
EPhoneNumberCountrySource *source)
{
#ifdef ENABLE_PHONENUMBER
return _e_phone_number_cxx_get_country_code (phone_number, source);
#else /* ENABLE_PHONENUMBER */
/* The EPhoneNumber instance must be invalid. We'd also bail out with
* a warning if phone numbers are supported. Any code triggering this
* is broken and should be fixed. */
g_warning ("%s: The library was built without phone number support.", G_STRFUNC);
return 0;
#endif /* ENABLE_PHONENUMBER */
}
When ENABLE_PHONENUMBER
is not defined, e_phone_number_get_country_code() does not set source
and convert_phone() reads not initilized data from source
.