AWARE SYSTEMS
TIFF and LibTiff Mail List Archive

Thread

2005.12.11 12:44 "[Tiff] [PATCH] LynxOS compile fixes", by Olli Savia
2005.12.12 09:21 "Re: [Tiff] [PATCH] LynxOS compile fixes", by Andrey Kiselev
2005.12.13 21:11 "RE: [Tiff] Bug in tiffcp (unsupported codecs return 0)", by Jason Frank
2005.12.13 19:53 "RE: [Tiff] Bug in tiffcp (unsupported codecs return 0)", by Jason Frank
2005.12.12 21:32 "[Tiff] Bug in tiffcp (unsupported codecs return 0)", by Jason Frank
2005.12.14 02:34 "RE: [Tiff] Bug in tiffcp (unsupported codecs return 0)", by Jason Frank
2005.12.13 20:09 "Re: [Tiff] Bug in tiffcp (unsupported codecs return 0)", by Andrey Kiselev
2005.12.13 21:46 "Re: [Tiff] Bug in tiffcp (unsupported codecs return 0)", by Andrey Kiselev
2005.12.13 23:32 "Re: [Tiff] Bug in tiffcp (unsupported codecs return 0)", by Edward Lam

2005.12.13 20:09 "Re: [Tiff] Bug in tiffcp (unsupported codecs return 0)", by Andrey Kiselev

On Tue, Dec 13, 2005 at 01:53:49PM -0600, Frank, Jason wrote:

--- ../tiff-3.7.4-orig/tools/tiffcp.c 2005-07-08 04:03:49.000000000

-0500

+++  tools/tiffcp.c      2005-12-13 10:45:23.000000000 -0600

@@ -852,8 +852,10 @@
= 0; s < ns; s++) { for (s

                         tsize_t cc = (row + rowsperstrip > imagelength)
?

TIFFVStripSize(in, imagelength - row):

stripsize;

> -                       if (TIFFReadEncodedStrip(in, s, buf, cc) < 0 &&

!ignore)
- break;
+ if (TIFFReadEncodedStrip(in, s, buf, cc) < 0 &&
!ignore) {

 +                         _TIFFfree(buf);

 +                         return FALSE;

+ }
                        if (TIFFWriteEncodedStrip(out, s, buf, cc) < 0)
{

_TIFFfree(buf);

return (FALSE);

This same issue appears to be present in all of the cpFunc's, athough

that to all the cpFuncs (and possibly some others...)

I'm worried that this is not the correct fix. Can someone tell me if

Jason,

I have fixed this issue today. Please, try the latest CVS snapshot and report results, if something will be wrong.

Also, I've noticed that when this happens, we do not unlink the new TIF that we're creating (assuming that we're not appending.) That's a

pretty easy fix. Any interest in doing that?

Well, I don't want to unlink the broken file. Does it really needed?

Regards,

Andrey

--
Andrey V. Kiselev
ICQ# 26871517