loader/i386/linux: Cast left shift to grub_uint32_t
authorAlec Brown <alec.r.brown@oracle.com>
Fri, 7 Feb 2025 01:47:57 +0000 (01:47 +0000)
committerFelix Zielcke <fzielcke@z-51.de>
Wed, 11 Jun 2025 15:42:34 +0000 (17:42 +0200)
commitcfa1a107f3146539d8dafc57c6ef9e8dfcad78b0
treec66a479d183b60fa416b2c8c55a3f8cb3f7822d0
parent477e65eaa007fcdf2ed1843e8c187fe68e60d1fa
loader/i386/linux: Cast left shift to grub_uint32_t

The Coverity complains that we might overflow into a negative value when
setting linux_params.kernel_alignment to (1 << align). We can remedy
this by casting it to grub_uint32_t.

Fixes: CID 473876
Signed-off-by: Alec Brown <alec.r.brown@oracle.com>
Reviewed-by: Daniel Kiper <daniel.kiper@oracle.com>
Gbp-Pq: Topic cve-2025-jan
Gbp-Pq: Name loader-i386-linux-Cast-left-shift-to-grub_uint32_t.patch
grub-core/loader/i386/linux.c