summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>2015-03-13 21:10:12 -0500
committerZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>2015-03-13 23:42:16 -0400
commit7c5925a448551129ec2e11157c847703def79608 (patch)
treef1fbe72ef7e212e78beddf6efe775b1f971907cc
parent9fff898181e71ab6389071b5c35b3ab7112b953e (diff)
efi: widen operand to avoid overflow
CID #1287141.
-rw-r--r--src/boot/efi/splash.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/boot/efi/splash.c b/src/boot/efi/splash.c
index 81d6439f43..470ea3e2cc 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)