git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: "Shawn O. Pearce" <spearce@spearce.org>
To: Johan Herland <johan@herland.net>
Cc: git@vger.kernel.org, Paolo Teti <paolo.teti@gmail.com>
Subject: Re: [PATCH] Fix signedness on return value from xread()
Date: Tue, 15 May 2007 19:24:35 -0400	[thread overview]
Message-ID: <20070515232435.GQ3141@spearce.org> (raw)
In-Reply-To: <200705151439.25871.johan@herland.net>

Johan Herland <johan@herland.net> wrote:
> The return value from xread() is ssize_t. 
> Paolo Teti <paolo.teti@gmail.com> pointed out that in this case, the 
> signed return value was assigned to an unsigned type (size_t). This patch 
> fixes that.

Thanks for fixing this.  Its rather embarrassing as:

  commit 00be8dcc1aca3c1c1a94b39f0563d30d1fa89290
  Author: Sami Farin <safari-kernel@safari.iki.fi>
  Date:   Tue Apr 24 22:56:02 2007 +0300
  
      fast-import: size_t vs ssize_t
      
      size_t is unsigned, so (n < 0) is never true.
      
      Signed-off-by: Shawn O. Pearce <spearce@spearce.org>

was applied by me to fix this very bug and I also applied the
patch that created the buggy copy in pack-write.c.

-- 
Shawn.

      parent reply	other threads:[~2007-05-15 23:24 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-05-15 11:47 BUG in fixup_pack_header_footer(...) / pack-write.c checksum error never raised Paolo Teti
2007-05-15 12:39 ` [PATCH] Fix signedness on return value from xread() Johan Herland
2007-05-15 12:48   ` Paolo Teti
2007-05-15 12:49   ` [PATCH] Ensure return value from xread() is always stored into an ssize_t Johan Herland
2007-05-15 16:12     ` Dana How
2007-05-15 16:21       ` Johan Herland
2007-05-15 23:24   ` Shawn O. Pearce [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=20070515232435.GQ3141@spearce.org \
    --to=spearce@spearce.org \
    --cc=git@vger.kernel.org \
    --cc=johan@herland.net \
    --cc=paolo.teti@gmail.com \
    /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).