mirror of
https://git.savannah.gnu.org/git/grub.git
synced 2026-10-25 16:49:23 +00:00
disk/lvm: Use zalloc to ensure that segments are initialised to sane value.
Reported by: EmanueL Czirai.
This commit is contained in:
1 parent
8e5bc2f4d3
commit
2ae9457e6e
1 file changed
+1
-1
@@ -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++)
|
||||
|
||||
Reference in new issue
Block a user