AWARE SYSTEMS
TIFF and LibTiff Mail List Archive

Thread

1998.11.24 07:10 "Bug in tif_unix.c", by Terry Wells
1998.11.24 07:14 "Re: Bug in tif_unix.c", by Bjorn Brox
1998.11.24 18:31 "Re: Bug in tif_unix.c", by Sam Leffler
1998.11.24 19:11 "Re: Bug in tif_unix.c", by Rex Jolliff

1998.11.24 07:10 "Bug in tif_unix.c", by Terry Wells

Hi all,

I just noticed a bug in tif_unix.c (and perhaps tif_win32.c, but I'm not sure)

Catch is, I don't know if it's worth fixing or not...

The Problem:

In the function _tiffMapProc, the function _tiffSizeProc is used to get the size of the file. This size is then compared with -1 to check for an error.

The problem is that _tiffSizeProc always returns a value >= 0. Thus size will never be -1 and _tiffMapProc will always attempt to map the file.


Editor's note: This mail was not originally archived, and has been reconstructed from quotes.