chiark
/
gitweb
/
~ianmdlvl
/
elogind.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
9fff898
)
efi: widen operand to avoid overflow
author
Zbigniew Jędrzejewski-Szmek
<zbyszek@in.waw.pl>
Sat, 14 Mar 2015 02:10:12 +0000
(21:10 -0500)
committer
Zbigniew Jędrzejewski-Szmek
<zbyszek@in.waw.pl>
Sat, 14 Mar 2015 03:42:16 +0000
(23:42 -0400)
CID #
1287141
.
src/boot/efi/splash.c
patch
|
blob
|
history
diff --git
a/src/boot/efi/splash.c
b/src/boot/efi/splash.c
index 81d6439f434495fe971b3aa5f911c494da644dcd..470ea3e2cc85a57956ebb84aff6770159a158f33 100644
(file)
--- 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)