grub-devel
[Top][All Lists]
Advanced

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

Re: [PATCH 3/7] Initial support for U-Boot platforms


From: Lennart Sorensen
Subject: Re: [PATCH 3/7] Initial support for U-Boot platforms
Date: Wed, 3 Apr 2013 14:05:39 -0400
User-agent: Mutt/1.5.20 (2009-06-14)

On Wed, Apr 03, 2013 at 04:24:51PM +0000, Leif Lindholm wrote:
> Because I am an overtly paranoid person. :)

That's not paranoid.  That's just inefficient.  The length argument has
to be based on the target size, NOT the length of the source.  If you want
to length of the source, that's what plain old strcpy does by definition.

I just found some of those in some other code I was cleaning up and
wasn't pleased with them there.  Just because it says strncpy doesn't
mean what you are doing is any safer than strcpy if you do it wrong.

-- 
Len Sorensen



reply via email to

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