mirror of
https://gitlab.gnome.org/GNOME/glib.git
synced 2025-01-24 21:16:15 +01:00
ghash: Fix out-of-range use of signed integer
We were mistakenly shifting a signed int literal by up to 31 places. Specify unsigned int instead. Closes #1570
This commit is contained in:
parent
603fb5958d
commit
d3074a748f
@ -691,7 +691,7 @@ get_status_bit (const guint32 *bitmap, guint index)
|
|||||||
static inline void
|
static inline void
|
||||||
set_status_bit (guint32 *bitmap, guint index)
|
set_status_bit (guint32 *bitmap, guint index)
|
||||||
{
|
{
|
||||||
bitmap[index / 32] |= 1 << (index % 32);
|
bitmap[index / 32] |= 1U << (index % 32);
|
||||||
}
|
}
|
||||||
|
|
||||||
/* By calling dedicated resize functions for sets and maps, we avoid 2x
|
/* By calling dedicated resize functions for sets and maps, we avoid 2x
|
||||||
|
Loading…
Reference in New Issue
Block a user