Grub Development Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: "Vladimir 'φ-coder/phcoder' Serbinenko" <phcoder@gmail.com>
To: The development of GNU GRUB <grub-devel@gnu.org>
Subject: Re: [PATCH] switch from sprintf to asprintf and snprintf
Date: Sun, 17 Jan 2010 13:02:16 +0100	[thread overview]
Message-ID: <4B52FC48.2040208@gmail.com> (raw)
In-Reply-To: <20100101115158.GF3692@thorin>

[-- Attachment #1: Type: text/plain, Size: 809 bytes --]

Robert Millan wrote:
> On Tue, Dec 29, 2009 at 10:30:12AM +0100, Vladimir 'φ-coder/phcoder' Serbinenko wrote:
>   
>> sprintf is potentially dangerous especially with gettext, when messages
>> may be larger than coder would expect. I attach the patch to fix it
>>     
>
> Could you split the patches into one for asprintf and one for *nprintf?  The
> asprintf one is something I'd really like to see in trunk.  For the rest I'm
> not so sure.
>   
Implementing sprintf on top of this would be just a waste. It would need
to add conditions to ignore size limits. IMHO unavailability of sprintf
decreases temptaion of making a 1024-bytes buffer and hoping it fits, or
at very least we don't have a memory corruption when it doesn't


-- 
Regards
Vladimir 'φ-coder/phcoder' Serbinenko



[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 293 bytes --]

      reply	other threads:[~2010-01-17 12:02 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-12-29  9:30 [PATCH] switch from sprintf to asprintf and snprintf Vladimir 'φ-coder/phcoder' Serbinenko
2010-01-01  9:32 ` Colin Watson
2010-01-01 11:52   ` Robert Millan
2010-01-01 12:01     ` Colin Watson
2010-01-17 12:02     ` Vladimir 'φ-coder/phcoder' Serbinenko
2010-01-19 22:29       ` Robert Millan
2010-01-19 22:56         ` Colin Watson
2010-01-19 23:16           ` Robert Millan
2010-01-17 11:59   ` Vladimir 'φ-coder/phcoder' Serbinenko
2010-01-01 11:51 ` Robert Millan
2010-01-17 12:02   ` Vladimir 'φ-coder/phcoder' Serbinenko [this message]

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=4B52FC48.2040208@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