2018.04.23 16:00 "[Tiff] libTiff Bug", by SM

2018.04.24 18:35 "Re: [Tiff] libTiff Bug", by Even Rouault

On mardi 24 avril 2018 14:23:25 CEST SM wrote:

I changed the code to avoid the overflow

#include <tiffio.h>

uint64 npixels=width*height;

That's still not correct. The widening to uint64 occurs after the multiplication which is done on uint32. So you need to explicitly cast to uint64 one of width or height too

uint64 npixels = (uint64)width * height;

--
Spatialys - Geospatial professional services
http://www.spatialys.com