From 2ae9457e6eb4c352051fb32bc6fc931a22528ab2 Mon Sep 17 00:00:00 2001 From: Vladimir Serbinenko Date: Sat, 14 Feb 2015 20:31:00 +0100 Subject: [PATCH] disk/lvm: Use zalloc to ensure that segments are initialised to sane value. Reported by: EmanueL Czirai. --- grub-core/disk/lvm.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/grub-core/disk/lvm.c b/grub-core/disk/lvm.c index 862a9664f..1e7f197f0 100644 --- a/grub-core/disk/lvm.c +++ b/grub-core/disk/lvm.c @@ -426,7 +426,7 @@ grub_lvm_detect (grub_disk_t disk, #endif goto lvs_fail; } - lv->segments = grub_malloc (sizeof (*seg) * lv->segment_count); + lv->segments = grub_zalloc (sizeof (*seg) * lv->segment_count); seg = lv->segments; for (i = 0; i < lv->segment_count; i++)