projects
/
platform
/
upstream
/
systemd.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
3d6c184
)
boot: change multiplication order
author
Zbigniew Jędrzejewski-Szmek
<zbyszek@in.waw.pl>
Tue, 2 Oct 2018 10:17:21 +0000
(12:17 +0200)
committer
Zbigniew Jędrzejewski-Szmek
<zbyszek@in.waw.pl>
Tue, 2 Oct 2018 10:54:00 +0000
(12:54 +0200)
LGTM was complaining:
> Multiplication result may overflow 'unsigned int' before it is converted to 'unsigned long'.
src/boot/efi/splash.c
patch
|
blob
|
history
diff --git
a/src/boot/efi/splash.c
b/src/boot/efi/splash.c
index
a78f8fd
..
ba4a2c5
100644
(file)
--- 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;