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

2018.04.24 19:04 "Re: [Tiff] libTiff Bug", by Bob Friesenhahn

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;

It is also necessary to check the pointer returned by _TIFFmalloc() to assure that it is not NULL. Address space and memory is finite.

Bob
--
Bob Friesenhahn
bfriesen@simple.dallas.tx.us, http://www.simplesystems.org/users/bfriesen/
GraphicsMagick Maintainer, http://www.GraphicsMagick.org/