From: Zbigniew Jędrzejewski-Szmek Date: Tue, 2 Oct 2018 10:17:21 +0000 (+0200) Subject: boot: change multiplication order X-Git-Tag: v240~648^2~4 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=cac4d95ec8b03d9f76ba9f488ce451c66aa006a9;p=platform%2Fupstream%2Fsystemd.git boot: change multiplication order LGTM was complaining: > Multiplication result may overflow 'unsigned int' before it is converted to 'unsigned long'. --- 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;