2016.07.03 16:32 "[Tiff] No memcpy() in TIFFRead/WriteEncodedStrip/Tile in uncompressed case", by Even Rouault

2016.07.03 17:20 "Re: [Tiff] No memcpy() in TIFFRead/WriteEncodedStrip/Tile in uncompressed case", by Tom Lane

When profiling I/O in the uncompressed case, I noticed that TIFFRead/WriteEncodedStrip/Tile used memcpy() to copy the data between the user provided buffer and the tif_rawdata intermediate buffer. I've committed an improvement to avoid that: https://trac.osgeo.org/gdal/changeset/34533 It works fine in my testing, but I'm not sure if I may have forgotten corner cases in the use of the API that would need additional checks and you may be aware of.

Seems like in the write case, you've added a new assumption that it's okay for the library to clobber the user-supplied buffer contents. I'm dubious about that, the more so since it only happens in some cases.

regards, tom lane