All of lore.kernel.org
 help / color / mirror / Atom feed
From: Linus Torvalds <torvalds@linux-foundation.org>
To: Johannes Schindelin <Johannes.Schindelin@gmx.de>
Cc: git@vger.kernel.org, junkio@cox.net
Subject: Re: [PATCH] fetch--tool: fix uninitialized buffer when reading from stdin
Date: Mon, 26 Feb 2007 10:05:59 -0800 (PST)	[thread overview]
Message-ID: <Pine.LNX.4.64.0702261003480.12485@woody.linux-foundation.org> (raw)
In-Reply-To: <Pine.LNX.4.63.0702261827510.22628@wbgn013.biozentrum.uni-wuerzburg.de>



On Mon, 26 Feb 2007, Johannes Schindelin wrote:

> Hi,
> 
> On Mon, 26 Feb 2007, Linus Torvalds wrote:
> 
> > I suspect you only tested with small input to stdin.
> 
> Addendum: yes, I only tested with a reflist which was smaller than one 
> megabyte ;-)

Well, that CHUNK_SIZE is just silly. I don't see why you'd have a 
chunk-size of a megabyte to begin with, IO doesn't really get any more 
efficient that way. And yeah, in this case it would easily hide the bug, 
because in practice nobody would ever test with that much input data.

It might make sense to make the chunk-size smaller just from a testability 
standpoint (not to mention that it's probably currently just wasting 
memory for most users - although at least under Linux, if you never use a 
page, none will be allocated for you, so the OS may hide the wastage).

		Linus

  reply	other threads:[~2007-02-26 18:05 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-02-26 12:08 [PATCH] fetch--tool: fix uninitialized buffer when reading from stdin Johannes Schindelin
2007-02-26 16:24 ` Linus Torvalds
2007-02-26 16:47   ` Johannes Schindelin
2007-02-26 17:06     ` Linus Torvalds
2007-02-26 17:27       ` Johannes Schindelin
2007-02-26 17:28       ` Johannes Schindelin
2007-02-26 18:05         ` Linus Torvalds [this message]
2007-02-26 19:21           ` Junio C Hamano
2007-02-26 19:37           ` Junio C Hamano
2007-02-27 19:35             ` Johannes Schindelin

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=Pine.LNX.4.64.0702261003480.12485@woody.linux-foundation.org \
    --to=torvalds@linux-foundation.org \
    --cc=Johannes.Schindelin@gmx.de \
    --cc=git@vger.kernel.org \
    --cc=junkio@cox.net \
    /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.