2017.05.21 19:28 "[Tiff] Libtiff 4.0.8 released", by Bob Friesenhahn

2017.07.04 11:30 "Re: [Tiff] A bug in libtiff error/warning handling", by Even Rouault

On mardi 4 juillet 2017 14:04:35 CEST Paavo Helde wrote:

I would like to report what I think is a bug in libtiff error and warning handling. There are two error handlers which can be installed (via TIFFSetErrorHandler and TIFFSetErrorHandlerExt) and which are called with a va_list. However, if both handlers are installed they will both iterate through the same va_list without reinitialization which is not allowed (seems to crash randomly with gcc on Linux, for example). I believe it should be the task of libtiff to reinitialize va_list between the calls. Ditto for warnings.

A patch file is attached, hopefully in a usable format.

That's a good point, but I wonder why you would have both error handlers installed? That isn't really expected.

I'm wondering if we shouldn't use the HandlerExt on priority over the Handler to avoid the warning/error to be reported twice? What do other devs think?

But if we want to keep the current behaviour of reporting twice, your patch looks indeed right.

Even

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