From: "Vladimir 'φ-coder/phcoder' Serbinenko" <phcoder@gmail.com>
To: The development of GNU GRUB <grub-devel@gnu.org>
Subject: Re: [PATCH 3/7] Initial support for U-Boot platforms
Date: Wed, 03 Apr 2013 21:59:32 +0200 [thread overview]
Message-ID: <515C8A24.1070605@gmail.com> (raw)
In-Reply-To: <20130403180539.GI21768@csclub.uwaterloo.ca>
[-- Attachment #1: Type: text/plain, Size: 693 bytes --]
On 03.04.2013 20:05, Lennart Sorensen wrote:
> 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.
>
Please use grub_strdup in this case. Also grub_stpcpy may be useful
[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 294 bytes --]
next prev parent reply other threads:[~2013-04-03 19:59 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-03-24 17:01 [PATCH 3/7] Initial support for U-Boot platforms Leif Lindholm
2013-03-30 16:20 ` Francesco Lavra
2013-03-30 16:43 ` Vladimir 'φ-coder/phcoder' Serbinenko
2013-04-03 16:24 ` Leif Lindholm
2013-04-03 18:05 ` Lennart Sorensen
2013-04-03 19:59 ` Vladimir 'φ-coder/phcoder' Serbinenko [this message]
2013-04-01 2:08 ` Vladimir 'φ-coder/phcoder' Serbinenko
2013-04-03 16:17 ` Leif Lindholm
2013-04-08 10:49 ` Vladimir 'φ-coder/phcoder' Serbinenko
2013-04-09 10:37 ` Leif Lindholm
2013-04-09 11:29 ` Vladimir 'φ-coder/phcoder' Serbinenko
2013-05-02 19:25 ` Vladimir 'φ-coder/phcoder' Serbinenko
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=515C8A24.1070605@gmail.com \
--to=phcoder@gmail.com \
--cc=grub-devel@gnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).