grub-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [PATCH] Bug fix for LVM


From: Robert Millan
Subject: Re: [PATCH] Bug fix for LVM
Date: Fri, 31 Jul 2009 17:44:46 +0200
User-agent: Mutt/1.5.18 (2008-05-17)

On Wed, Jul 29, 2009 at 11:22:56AM +0800, Bean wrote:
> On Wed, Jul 29, 2009 at 1:42 AM, Robert Millan<address@hidden> wrote:
> > On Tue, Jul 28, 2009 at 11:15:09PM +0800, Bean wrote:
> >> -  buf2 = grub_zalloc (size);
> >> +  buf2 = grub_malloc (size);
> >>    if (!buf2)
> >>      return grub_errno;
> >>
> >> +  grub_memset (buf, 0, size);
> >
> > We just received 'buf' as parameter.  Why do we have to zero it here?
> 
> Hi,
> 
> Because we are in a recovery function, the original content may not be
> correct, we need to clear it out before continue.

Alright.  I think a comment would help, it's not obvious why it's done this
way.

-- 
Robert Millan

  The DRM opt-in fallacy: "Your data belongs to us. We will decide when (and
  how) you may access your data; but nobody's threatening your freedom: we
  still allow you to remove your data and not access it at all."




reply via email to

[Prev in Thread] Current Thread [Next in Thread]