libmm-glib,sms-properties: fix potential NULL dereference
This patch fixes a potential NULL referenece issue in mm_sms_properties_get_data() where it accesses `self->priv->data->data' when `self->priv->data' could be potentially NULL.
This commit is contained in:
@@ -157,10 +157,10 @@ mm_sms_properties_get_data (MMSmsProperties *self,
|
||||
{
|
||||
g_return_val_if_fail (MM_IS_SMS_PROPERTIES (self), NULL);
|
||||
|
||||
if (self->priv->data && data_len)
|
||||
*data_len = self->priv->data->len;
|
||||
if (data_len)
|
||||
*data_len = (self->priv->data ? self->priv->data->len : 0);
|
||||
|
||||
return self->priv->data->data;
|
||||
return (self->priv->data ? self->priv->data->data : NULL);
|
||||
}
|
||||
|
||||
/**
|
||||
|
Reference in New Issue
Block a user