Re: [PATCH] Fix signedness on return value from xread()

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Johan Herland <johan@xxxxxxxxxxx> wrote:
> The return value from xread() is ssize_t. 
> Paolo Teti <paolo.teti@xxxxxxxxx> 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@xxxxxxxxxxxxx>
  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@xxxxxxxxxxx>

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.
-
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]

  Powered by Linux