mirror of
https://git.proxmox.com/git/grub2
synced 2025-08-02 19:24:15 +00:00
disk/lvm: Use zalloc to ensure that segments are initialised to sane value.
Reported by: EmanueL Czirai.
This commit is contained in:
parent
8e5bc2f4d3
commit
2ae9457e6e
@ -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++)
|
||||
|
Loading…
Reference in New Issue
Block a user