Guard g_inet_address_mask_equal against invalid input

https://bugzilla.gnome.org/show_bug.cgi?id=733338
This commit is contained in:
Erik van Pienbroek 2014-07-17 18:37:04 +02:00 committed by Dan Winship
parent 0501bf26b9
commit 92d6735898

View File

@ -465,6 +465,9 @@ gboolean
g_inet_address_mask_equal (GInetAddressMask *mask,
GInetAddressMask *mask2)
{
g_return_val_if_fail (G_IS_INET_ADDRESS_MASK (mask), FALSE);
g_return_val_if_fail (G_IS_INET_ADDRESS_MASK (mask2), FALSE);
return ((mask->priv->length == mask2->priv->length) &&
g_inet_address_equal (mask->priv->addr, mask2->priv->addr));
}