2016.08.07 03:52 "[Tiff] fax2tiff in libtiff 4.0.5 and 4.0.6", by Steve Underwood

2016.08.07 13:37 "Re: [Tiff] fax2tiff in libtiff 4.0.5 and 4.0.6", by Bob Friesenhahn

Can anyone shed some light on the goal of this change?

I think that the goal of this change is that for Microsoft Windows the handle can be larger than the space available. Apparently the change is defective.

Bob

Regards,

Steve

1c1
< /* $Id: fax2tiff.c,v 1.23 2015-06-21 01:09:10 bfriesen Exp $ */
---
 > /* $Id: fax2tiff.c,v 1.24 2015-08-23 15:40:45 bfriesen Exp $ */
74a75,88
 > /*
 > Struct to carry client data. Note that it does not appear that the
client
 > data is actually used in this program.
 > */
 > typedef struct _FAX_Client_Data
 > {
 > #if defined(_WIN32) && defined(USE_WIN32_FILEIO)
 > intptr_t fh; /* Operating system file handle */
 > #else

 >         int fd;      /* Integer file descriptor */

 > #endif
 >
 > } FAX_Client_Data;
 >
79a94
 > FAX_Client_Data client_data;
270c285
< TIFFSetClientdata(faxTIFF,
(thandle_t)_get_osfhandle(fileno(in)));
---
 > client_data.fh = _get_osfhandle(fileno(in));
272c287
< TIFFSetClientdata(faxTIFF, (thandle_t)fileno(in));
---
 > client_data.fd = fileno(in);
273a289
 > TIFFSetClientdata(faxTIFF, (thandle_t) &client_data);

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