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
March 2010

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

2010.03.16 17:38 "Heap corruption reading ICC profiles under windows", by Dan Pidcock
2010.03.16 18:24 "Re: Heap corruption reading ICC profiles under windows", by Olivier Paquet
2010.03.17 14:54 "Re: Heap corruption reading ICC profiles under windows", by Dan Pidcock

2010.03.16 17:38 "Heap corruption reading ICC profiles under windows", by Dan Pidcock

When I use tiff lib under windows to read a TIFF that has an embedded ICC
profile (created by Adobe Photoshop CS3) I am seeing heap corruption
in TIFFFreeDirectory when calling _TIFFfree for the custom tag. Is this a
known issue or some problem with my configuration that I need to sort out? I
have tried 3.8.2 and 4.0.0beta5 versions of tiff lib.

I built tiff lib using nmake after modifying the nmake.opt file to comment
out USE_WIN_CRT_LIB = 1.

The code I am using to test is:

    TIFF* tif = TIFFOpen(argv[1], "r");
    if (tif) {
        unsigned long profileSize;
        unsigned char *rawIccProfile = NULL;
        if (TIFFGetField (tif, TIFFTAG_ICCPROFILE, &profileSize,
&rawIccProfile))
            _TIFFfree(rawIccProfile);
        TIFFClose(tif);
    }

which is fundamentally the same as that used at
http://www.littlecms.com/tiffemb.c and
http://www.freecolormanagement.com/download/tiff_icc.diff

Any ideas gratefully received,

Dan