Fix aligning up addresses greater than 4GB

PVS: The size of the bit mask is less than the size of the first operand.
This commit is contained in:
Richard Hughes 2022-09-09 11:11:22 +01:00
parent aa71485cc5
commit 9ab03d586e

View File

@ -218,7 +218,7 @@ gsize
fu_common_align_up(gsize value, guint8 alignment)
{
gsize value_new;
guint32 mask = 1 << alignment;
gsize mask = (gsize)1 << alignment;
g_return_val_if_fail(alignment <= FU_FIRMWARE_ALIGNMENT_2G, G_MAXSIZE);