2008-04-14 Vesa Jaaskelainen <chaac@nic.fi>

* disk/lvm.c (grub_lvm_scan_device): Add forgotten failure path when
        there is no memory left for physical volume name.
This commit is contained in:
chaac 2008-04-14 19:39:04 +00:00
parent 0a1150e26b
commit 01979850ed
2 changed files with 9 additions and 0 deletions

View file

@ -1,3 +1,8 @@
2008-04-14 Vesa Jaaskelainen <chaac@nic.fi>
* disk/lvm.c (grub_lvm_scan_device): Add forgotten failure path when
there is no memory left for physical volume name.
2008-04-14 Vesa Jaaskelainen <chaac@nic.fi>
* disk/lvm.c (grub_lvm_scan_device): Fix logical volume's physical

View file

@ -477,7 +477,11 @@ grub_lvm_scan_device (const char *name)
q++;
s = q - p;
pvname = grub_malloc (s + 1);
if (pvname == NULL)
goto lvs_segment_fail2;
grub_memcpy (pvname, p, s);
pvname[s] = '\0';