1993.09.08 15:03 "Another Minor tif_write.c Bug", by Niles Ritter
LIBTIFF Users (and Sam),
There seems to be another little bug in the 3.3 tif_write.c module (cf Craig Jackson's note on 30 Aug 1993 17:43:22 -0500 (EST)). The routine TIFFWriteEncodedTile used to take a parameter "cc" which was typed "u_long", and then when a "-1L" was passed in, the large cc value was reset to the tilesize. The parameter is now tsize_t, which is signed, and so the relevant (corrected) code should read:
* Clamp write amount to the tile size. This is mostly
* done so that callers can pass in some large number
* (e.g. -1) and have the tile size used instead.
if (cc > tif->tif_tilesize || cc==(tsize_t)-1)
cc = tif->tif_tilesize;
or something similar.