On Wed, Apr 15, 2009 at 04:59:07PM +0200, Tobias Nygren wrote: | On Mon, 13 Apr 2009 00:07:26 +0000 | Luke Mewburn <lukem%netbsd.org@localhost> wrote: | | > Modified Files: | > src/usr.bin/patch: inp.c | > | > Log Message: | > Fix sign-compare issue | > | > To generate a diff of this commit: | > cvs rdiff -u -r1.19 -r1.20 src/usr.bin/patch/inp.c | | What about platforms where off_t is too small to hold SIZE_MAX? | At least on amd64 the condition now always evaluates to true. I've changed this to cast both the size_t (unsigned 32 or 64 bit value) and the off_t (signed 64 bit) to uintmax_t before comparing. It seems like the 'best' way to fix this for both 32 and 64 bit NetBSD platforms.
Attachment:
pgp0WvS1nFKPp.pgp
Description: PGP signature