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
February 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.02.05 18:38 "assertions, and building with DEBUG/NDEBUG", by Frank Warmerdam
2009.02.05 19:04 "Re: assertions, and building with DEBUG/NDEBUG", by Edward Lam
2009.02.05 19:13 "Re: assertions, and building with DEBUG/NDEBUG", by Bob Friesenhahn
2009.02.05 19:26 "Re: assertions, and building with DEBUG/NDEBUG", by Frank Warmerdam
2009.02.05 20:00 "Re: assertions, and building with DEBUG/NDEBUG", by Bob Friesenhahn
2009.02.06 04:39 "Re: assertions, and building with DEBUG/NDEBUG", by Phillip Crews
2009.02.06 16:33 "Re: assertions, and building with DEBUG/NDEBUG", by Bob Friesenhahn
2009.02.06 20:34 "Re: assertions, and building with DEBUG/NDEBUG", by Phillip Crews
2009.02.06 12:17 "Re: assertions, and building with DEBUG/NDEBUG", by <ron@debian.org>
2009.02.06 13:57 "Re: assertions, and building with DEBUG/NDEBUG", by Edward Lam
2009.02.06 17:08 "Re: assertions, and building with DEBUG/NDEBUG", by Bob Friesenhahn
2009.02.06 21:05 "Re: assertions, and building with DEBUG/NDEBUG", by Phillip Crews
2009.02.06 10:07 "Re: assertions, and building with DEBUG/NDEBUG", by Joris Van Damme
2009.02.06 15:05 "Re: assertions, and building with DEBUG/NDEBUG", by Frank Warmerdam
2009.02.06 10:44 "Re: assertions, and building with DEBUG/NDEBUG", by Joris Van Damme
2009.02.06 14:56 "Re: assertions, and building with DEBUG/NDEBUG", by Frank Warmerdam
2009.02.07 10:53 "Re: assertions, and building with DEBUG/NDEBUG", by Joris Van Damme
2009.02.07 14:10 "Re: The OJPEG bug 1996", by Joris Van Damme
2009.02.26 22:44 "Re: assertions, and building with DEBUG/NDEBUG", by Joris Van Damme

2009.02.26 22:44 "Re: assertions, and building with DEBUG/NDEBUG", by Joris Van Damme

Frank, folks,

> http://bugzilla.maptools.org/show_bug.cgi?id=1994

There's been no response on my proposed fix, in the mailing list nor on 
bugzilla. But I need LibTiff to not crash on me, for crosstesting, so I did 
a quick hack that is even shorter and easier then the fix I proposed before 
as I realized we don't actually need to sort. We merely have to keep away 
duplicate tags, for IGNORE to work. So we could simply keep away the 
duplicates by flagging them IGNORE prior to any other processing. I inserted 
the following few lines in the TIFFReadDirectory function, in tif_dirread.c, 
near the top of that function right between the call to 
TIFFReadDirectoryCheckOrder and the partial resetting of tif->tif_flags.

{
 TIFFDirEntry* ma;
 uint16 mb;
 for (ma=dir, mb=0; mb<dircount; ma++, mb++)
 {
  TIFFDirEntry* na;
  uint16 nb;
  for (na=ma+1, nb=mb+1; nb<dircount; na++, nb++)
  {
   if (ma->tdir_tag==na->tdir_tag)
    na->tdir_tag=IGNORE;
  }
 }
}

That does not just solve this problem, it'll solve all problems with 
duplicate instances of any special tag, and means the IGNORE mechanism works 
as intented. Someone with CVS write access please consider this fix.


Best regards,

Joris