struct _OstreeBloom
{
guint ref_count;
- gsize n_bytes;
+ gsize n_bytes; /* 0 < n_bytes <= G_MAXSIZE / 8 */
gboolean is_mutable; /* determines which of [im]mutable_bytes is accessed */
union
{
g_autoptr(OstreeBloom) bloom = NULL;
g_return_val_if_fail (n_bytes > 0, NULL);
+ g_return_val_if_fail (n_bytes <= G_MAXSIZE / 8, NULL);
g_return_val_if_fail (k > 0, NULL);
g_return_val_if_fail (hash_func != NULL, NULL);
g_return_val_if_fail (bytes != NULL, NULL);
g_return_val_if_fail (g_bytes_get_size (bytes) > 0, NULL);
+ g_return_val_if_fail (g_bytes_get_size (bytes) <= G_MAXSIZE / 8, NULL);
g_return_val_if_fail (k > 0, NULL);
g_return_val_if_fail (hash_func != NULL, NULL);