]> git.ipfire.org Git - thirdparty/grub.git/commit
fs: Use safe math macros to prevent overflows
authorLidong Chen <lidong.chen@oracle.com>
Tue, 21 Jan 2025 19:02:36 +0000 (19:02 +0000)
committerDaniel Kiper <daniel.kiper@oracle.com>
Thu, 13 Feb 2025 14:45:57 +0000 (15:45 +0100)
commit6608163b08a7a8be4b0ab2a5cd4593bba07fe2b7
tree98cdb75d2c52f05fd3f30d9142e6add5ffc7e4f1
parentfbaddcca541805c333f0fc792b82772594e73753
fs: Use safe math macros to prevent overflows

Replace direct arithmetic operations with macros from include/grub/safemath.h
to prevent potential overflow issues when calculating the memory sizes.

Signed-off-by: Lidong Chen <lidong.chen@oracle.com>
Reviewed-by: Daniel Kiper <daniel.kiper@oracle.com>
grub-core/fs/archelp.c
grub-core/fs/btrfs.c
grub-core/fs/cpio_common.c
grub-core/fs/erofs.c
grub-core/fs/f2fs.c
grub-core/fs/ntfscomp.c
grub-core/fs/squash4.c
grub-core/fs/xfs.c