From: Zbigniew Jędrzejewski-Szmek Date: Sat, 14 Mar 2015 02:10:12 +0000 (-0500) Subject: efi: widen operand to avoid overflow X-Git-Tag: v219.0~345 X-Git-Url: http://www.chiark.greenend.org.uk/ucgi/~ianmdlvl/git?p=elogind.git;a=commitdiff_plain;h=7c5925a448551129ec2e11157c847703def79608 efi: widen operand to avoid overflow CID #1287141. --- diff --git a/src/boot/efi/splash.c b/src/boot/efi/splash.c index 81d6439f4..470ea3e2c 100644 --- a/src/boot/efi/splash.c +++ b/src/boot/efi/splash.c @@ -97,7 +97,7 @@ EFI_STATUS bmp_parse_header(UINT8 *bmp, UINTN size, struct bmp_dib **ret_dib, return EFI_UNSUPPORTED; } - row_size = (((dib->depth * dib->x) + 31) / 32) * 4; + row_size = ((UINTN) dib->depth * dib->x + 31) / 32 * 4; if (file->size - file->offset < dib->y * row_size) return EFI_INVALID_PARAMETER; if (row_size * dib->y > 64 * 1024 * 1024)