]> git.ipfire.org Git - thirdparty/grub.git/commit
disk/cryptodisk: Fix potential integer overflow
authorDarren Kenny <darren.kenny@oracle.com>
Thu, 21 Jan 2021 11:38:31 +0000 (11:38 +0000)
committerDaniel Kiper <daniel.kiper@oracle.com>
Tue, 2 Mar 2021 14:54:16 +0000 (15:54 +0100)
commita201ad17caa430aa710654fdf2e6ab4c8166f031
tree1bbdcf45d0301ec46fc69bf90840e8a3ff6c3db1
parent156c281a1625dc73fd350530630c6f2d5673d4f6
disk/cryptodisk: Fix potential integer overflow

The encrypt and decrypt functions expect a grub_size_t. So, we need to
ensure that the constant bit shift is using grub_size_t rather than
unsigned int when it is performing the shift.

Fixes: CID 307788
Signed-off-by: Darren Kenny <darren.kenny@oracle.com>
Reviewed-by: Daniel Kiper <daniel.kiper@oracle.com>
grub-core/disk/cryptodisk.c