Bug#474931: grub-common: update-grub segfaults
Sami Liedes
sliedes at cc.hut.fi
Sat May 3 15:30:05 UTC 2008
On Wed, Apr 30, 2008 at 11:19:25PM +0200, Robert Millan wrote:
> On Sun, Apr 20, 2008 at 11:20:56PM +0300, Sami Liedes wrote:
> >
> > The problem is still the same, one grub_strstr() that you missed:
> > [...]
> > 315
> > 316 p = grub_strstr (q, "id = \"") + sizeof ("id = \"") - 1;
>
> Ok, let's see if we get it right this time. Please, could you test the
> attached patch?
Not quite, now the problem is that vg_list gets freed at fail4:.
Adding a "return 0;" before the fail4 label solves this problem (i.e.
no crash), however I'm not sure it does what you intended then, this
function is too long for me to grok quickly :)
> @@ -548,6 +548,10 @@ grub_lvm_scan_device (const char *name)
> }
> }
ADD HERE: return 0;
> + fail4:
> + grub_free (vg);
> + fail3:
> + grub_free (vgname);
> fail2:
> grub_free (metadatabuf);
> fail:
Sami
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: Digital signature
Url : http://lists.alioth.debian.org/pipermail/pkg-grub-devel/attachments/20080503/0f2ad142/attachment.pgp
More information about the Pkg-grub-devel
mailing list