]> git.ipfire.org Git - thirdparty/grub.git/commit
video/fb/fbfill: Fix potential integer overflow
authorDarren Kenny <darren.kenny@oracle.com>
Wed, 4 Nov 2020 15:10:51 +0000 (15:10 +0000)
committerDaniel Kiper <daniel.kiper@oracle.com>
Tue, 2 Mar 2021 14:54:17 +0000 (15:54 +0100)
commit7ce3259f67ac2cd93acb0ec0080c24b3b69e66c6
treeb4f8968f2eed198e15f3bcbd5a3f0ca80b6f5404
parentfc5951d3b1616055ef81a019a5affc09d13344d0
video/fb/fbfill: Fix potential integer overflow

The multiplication of 2 unsigned 32-bit integers may overflow before
promotion to unsigned 64-bit. We should ensure that the multiplication
is done with overflow detection. Additionally, use grub_sub() for
subtraction.

Fixes: CID 73640, CID 73697, CID 73702, CID 73823
Signed-off-by: Darren Kenny <darren.kenny@oracle.com>
Signed-off-by: Marco A Benatto <mbenatto@redhat.com>
Reviewed-by: Daniel Kiper <daniel.kiper@oracle.com>
grub-core/video/fb/fbfill.c