AWARE [SYSTEMS] Imaging expertise for the Delphi developer
AWare Systems, Imaging expertise for the Delphi developer, Home TIFF and LibTiff Mailing List Archive

LibTiff Mailing List

TIFF and LibTiff Mailing List Archive
December 2009

Previous Thread
Next Thread

Previous by Thread
Next by Thread

Previous by Date
Next by Date

Contact

The TIFF Mailing List Homepage
This list is run by Frank Warmerdam
Archive maintained by AWare Systems



Valid HTML 4.01!



Thread

2009.12.06 14:04 "TIFFFlushData1 return code verification", by Evgeny Fraimovitch
2009.12.06 15:56 "Re: TIFFFlushData1 return code verification", by Bob Friesenhahn
2009.12.06 15:57 "Re: TIFFFlushData1 return code verification", by Evgeny Fraimovitch

2009.12.06 14:04 "TIFFFlushData1 return code verification", by Evgeny Fraimovitch

Good time of day,

There is a certain inconsistency in TIFFFlushData1 error code handling, 
which can lead to unreported disk write errors. (such as when we are out 
of disk space)

For possibly related thread please see: *1994.10.21 15:50 "Problems 
catching write errors in tiff library (v3.3beta021)", by Ben Griffin* 
<http://www.asmail.be/msg0054980073.html>

In short: the tif_dumpmode.c DumpModeEncode returns (-1) when 
TIFFFlushData1 fails

         if (tif->tif_rawcc >= tif->tif_rawdatasize &&
             !TIFFFlushData1(tif))
             return (-1);

however its users expect it to return zero or non-zero value.

     LogLuvEncode24 and siblings does the same mistake.
     as does PackBitsEncode

The fix is to replace 'return (-1)' to 'return 0' in such places.

Sincerely yours,
     Evgeny
     VisionMap Ltd