]> git.ipfire.org Git - thirdparty/grub.git/commit
disk: Prevent overflows when allocating memory for arrays
authorAlec Brown <alec.r.brown@oracle.com>
Wed, 22 Jan 2025 02:55:10 +0000 (02:55 +0000)
committerDaniel Kiper <daniel.kiper@oracle.com>
Thu, 13 Feb 2025 14:45:56 +0000 (15:45 +0100)
commitd8151f98331ee4d15fcca59edffa59246d8fc15f
tree607aa87256466d4b793d296ecc6ec966e979c487
parentc407724dad6c3e2fc1571e57adbda71cc03f82aa
disk: Prevent overflows when allocating memory for arrays

Use grub_calloc() when allocating memory for arrays to ensure proper
overflow checks are in place.

Signed-off-by: Alec Brown <alec.r.brown@oracle.com>
Reviewed-by: Daniel Kiper <daniel.kiper@oracle.com>
grub-core/disk/cryptodisk.c
grub-core/disk/lvm.c