2004.09.16 19:12 "[Tiff] BigTIFF Tag Value Count issue", by Joris Van Damme

2004.09.17 04:20 "Re: [Tiff] BigTIFF Tag Value Count issue", by Bob Friesenhahn

Option 0: stick with 4 byte tag count members (alignment, tag data <= 4 gig, Frank's choice)
Option 1: make it an 8 byte tag count (no alignment, tag data > 4 gig allowed)
Option 2, courtesy of Bob: make it 8 byte tag count, add 4 padding bytes (alignment, tag data > 4 gig allowed)

Can I put you down as an option 2 vote, or were you merely signalling the option?

Sure, there should always be a second option so put me down for option 2. :-)

Can you think of a situation that needs an 8 byte count? Or do you just want the size increased on general principles?

The idea was to consume 8 bytes for alignment purposes but use 4 bytes out of those 8 bytes to support the value. Perhaps I misunderstood the problem. I don't have a strong opinion either way, but do believe that the format should be aligned to work well with memory-mapping.

If someone wants to create a tiff-bomb, they can do it just as easily with 4GB as they can with 1TB. In fact, the 4GB attack is more likely to cause a problem since the machine is more likely to perform the request.

Do you think that increasing the count to 8 bytes would be a problem in libTIFF?

I don't have the libtiff knowledge to properly answer that. If the availability of a native 64-bit storage type can be assumed (pretty safe if 32-bit processors are the new baseline) then it doesn't sound like an 8 byte value would be a problem.

Bob

======================================
Bob Friesenhahn
bfriesen@simple.dallas.tx.us
http://www.simplesystems.org/users/bfriesen