From: "Vesa Jääskeläinen" <chaac@nic.fi>
To: The development of GRUB 2 <grub-devel@gnu.org>
Subject: Re: [RFC] Is it okay to just use GNU extensions or should an alternative be provided too?
Date: Sat, 16 Aug 2008 15:54:45 +0300 [thread overview]
Message-ID: <48A6CE15.1030308@nic.fi> (raw)
In-Reply-To: <1218890593.5316.6.camel@fz.local>
Felix Zielcke wrote:
> But yeah maybe there's even in the kernel a use for asprintf,
> so maybe a good idea to make a grub_asprintf?
> This could be then either always used even if the util/*.c use the
> library functions normally or it could be done as with my
> grub_print_error change :)
It would be security feature to use automatic allocation of the memory
for needed amount of the memory. Then it is not possible to do buffer
overflow with those functions. So I have nothing against that. And in
anyway it is only small wrapper to snprintf and malloc so size impact
should not be too big either. Perhaps it can save space later on.
But about using string formatters from different systems can be
problematic. As on some systems differ what different specifiers do.
Good examples are cases where string can be wide char or ansi, or where
length of the integer can change.
When using it with grub's own formatters we know exactly how they perform.
next prev parent reply other threads:[~2008-08-16 12:54 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-08-16 12:05 [RFC] Is it okay to just use GNU extensions or should an alternative be provided too? Felix Zielcke
2008-08-16 12:32 ` Vesa Jääskeläinen
2008-08-16 12:39 ` Robert Millan
2008-08-16 12:43 ` Felix Zielcke
2008-08-16 12:54 ` Vesa Jääskeläinen [this message]
2008-08-16 12:58 ` Robert Millan
2008-08-16 12:39 ` Robert Millan
2008-08-16 12:48 ` Felix Zielcke
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=48A6CE15.1030308@nic.fi \
--to=chaac@nic.fi \
--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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.