From: Petr Baudis <pasky@suse.cz>
To: Timo Sirainen <tss@iki.fi>
Cc: git@vger.kernel.org
Subject: Re: [PATCH 2/3] Use stringbuf to fix buffer overflows due to broken use of snprintf()
Date: Tue, 22 May 2007 15:43:06 +0200 [thread overview]
Message-ID: <20070522134306.GL4489@pasky.or.cz> (raw)
In-Reply-To: <1179627879.32181.1286.camel@hurina>
On Sun, May 20, 2007 at 04:24:39AM CEST, Timo Sirainen wrote:
> @@ -1823,14 +1824,14 @@ static void diff_fill_sha1_info(struct diff_filespec *one)
> static void run_diff(struct diff_filepair *p, struct diff_options *o)
> {
> const char *pgm = external_diff();
> - char msg[PATH_MAX*2+300], *xfrm_msg;
> + stringbuf(msg, PATH_MAX*2+300);
I don't find this style of declaring a variable too clear; I think it
might be worthwhile to make this stand out more and uppercase the
stringbuf() macro.
--
Petr "Pasky" Baudis
Stuff: http://pasky.or.cz/
Ever try. Ever fail. No matter. // Try again. Fail again. Fail better.
-- Samuel Beckett
prev parent reply other threads:[~2007-05-22 13:43 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-05-20 2:24 [PATCH 2/3] Use stringbuf to fix buffer overflows due to broken use of snprintf() Timo Sirainen
2007-05-22 13:43 ` Petr Baudis [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=20070522134306.GL4489@pasky.or.cz \
--to=pasky@suse.cz \
--cc=git@vger.kernel.org \
--cc=tss@iki.fi \
/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).