From cac4d95ec8b03d9f76ba9f488ce451c66aa006a9 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Zbigniew=20J=C4=99drzejewski-Szmek?= Date: Tue, 2 Oct 2018 12:17:21 +0200 Subject: [PATCH] boot: change multiplication order LGTM was complaining: > Multiplication result may overflow 'unsigned int' before it is converted to 'unsigned long'. --- src/boot/efi/splash.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/boot/efi/splash.c b/src/boot/efi/splash.c index a78f8fd..ba4a2c5 100644 --- a/src/boot/efi/splash.c +++ b/src/boot/efi/splash.c @@ -280,7 +280,7 @@ EFI_STATUS graphics_splash(UINT8 *content, UINTN len, const EFI_GRAPHICS_OUTPUT_ GraphicsOutput->Mode->Info->VerticalResolution, 0); /* EFI buffer */ - blt_size = dib->x * dib->y * sizeof(EFI_GRAPHICS_OUTPUT_BLT_PIXEL); + blt_size = sizeof(EFI_GRAPHICS_OUTPUT_BLT_PIXEL) * dib->x * dib->y; blt = AllocatePool(blt_size); if (!blt) return EFI_OUT_OF_RESOURCES; -- 2.7.4