AWARE [SYSTEMS]
AWare Systems, , Home TIFF and LibTiff Mailing List Archive

LibTiff Mailing List

TIFF and LibTiff Mailing List Archive
June 2008

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



New Datamatrix section



Valid HTML 4.01!



Thread

2008.06.19 21:34 "Scalability problem in tif_dirread.c - detecting loops in IFD offsets", by Steve Eddins
2008.06.19 22:04 "Re: Scalability problem in tif_dirread.c - detecting loops in IFD offsets", by Frank Warmerdam
2008.06.20 12:02 "Re: Scalability problem in tif_dirread.c - detecting loops in IFD offsets", by Steve Eddins
2008.06.20 13:38 "Re: Scalability problem in tif_dirread.c - detecting loops in IFD offsets", by Bob Friesenhahn
2008.06.20 17:19 "Re: Scalability problem in tif_dirread.c - detecting loops in IFD offsets", by Andrey Kiselev
2008.06.20 18:19 "Re: Scalability problem in tif_dirread.c - detecting loops in IFD offsets", by Edward Lam
2008.06.22 17:15 "Re: Scalability problem in tif_dirread.c - detecting loops in IFD offsets", by Steve Eddins

2008.06.20 18:19 "Re: Scalability problem in tif_dirread.c - detecting loops in IFD offsets", by Edward Lam

I don't know how important this performance problem is but I think that 
Steve's suggestion to use Floyd's cycle detection is an easy way to 
avoid the problem. It would be a good candidate fix for 3.9 if it's 
important enough.

-Edward

Andrey Kiselev wrote:
> On Fri, Jun 20, 2008 at 08:02:32AM -0400, Steve Eddins wrote:
>> Thanks very much for your helpful responses.  Interesting that such
>> files really exist.
> 
> You can easily create such a file yourself using you favorite binary
> editor. With that file you can make a DOS attack on any TIFF software
> that is not aware of IFD looping problem. These days we should always
> double check the input data and we can trust no one.
> 
> Turning to code I should say that I always wanted to rewrite it and make
> a single scan over the file when opening and use resulting table later.
> Current TIFFSetDirectory() and TIFFNumberOfDirectories() implementations
> are not efficient for heavily multi-paged TIFFs, the IFD offset table can
> be used here. But be aware of in-place TIFF modifications, that table
> should be properly updated too.
> 
> If you will decide to contribute a patch for this stuff, please, do it
> against the 4.0 branch. That is too much for 3.9 which is considered to
> be a stable branch.
> 
> Best regards,
> Andrey
> 
>