mirror of
https://github.com/varun-r-mallya/sysprof.git
synced 2026-02-10 15:10:53 +00:00
contrib/bitset: avoid UB on when copying a bitset
This commit is contained in:
@ -319,7 +319,9 @@ egg_bitset_copy (const EggBitset *self)
|
|||||||
g_return_val_if_fail (self != NULL, NULL);
|
g_return_val_if_fail (self != NULL, NULL);
|
||||||
|
|
||||||
copy = egg_bitset_new_empty ();
|
copy = egg_bitset_new_empty ();
|
||||||
roaring_bitmap_overwrite (©->roaring, &self->roaring);
|
|
||||||
|
if (!egg_bitset_is_empty (self))
|
||||||
|
roaring_bitmap_overwrite (©->roaring, &self->roaring);
|
||||||
|
|
||||||
return copy;
|
return copy;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user