1998.09.29 10:24 "bug in tif_luv.c", by Stefan Brabec
Using tiff-v3.4beta037 (mips-sgi-irix6.5) I found the following bug when using logluv-encoding:
tif_luv.c: Since the variable 'tbuflen' is declared as short (using 2 bytes), the resulting bufferlength for an 256*256 pixel image is 0 bytes. (see line 1049, function LogL16InitState) So 'wasting' a few more bytes for the length-variable should work:
diff-output for file tif_luv.c:
141c141
< short tbuflen; /* buffer length */
---
> unsigned long tbuflen; /* buffer length */
1050c1050
< sp->tbuf = (tidata_t*) _TIFFmalloc(sp->tbuflen * sizeof
(int16));
---
> sp->tbuf = (tidata_t*) _TIFFmalloc(sp->tbuflen * sp->pixel_size);
Stefan
--
Stefan Brabec----------------------------------------------
Universitaet Erlangen-Nuernberg,Informatik
snbrabec@cip.informatik.uni-erlangen.de
http://wwwcip.informatik.uni-erlangen.de/user/snbrabec