Set tif_rawdatasize to zero when freeing raw data buf in WriteDirectory
This commit is contained in:
parent
4095f411c9
commit
bd4b07a6e5
@ -1,4 +1,4 @@
|
|||||||
/* $Header: /cvs/maptools/cvsroot/libtiff/libtiff/tif_dirwrite.c,v 1.4 1999-11-27 21:12:49 warmerda Exp $ */
|
/* $Header: /cvs/maptools/cvsroot/libtiff/libtiff/tif_dirwrite.c,v 1.5 2000-01-28 15:14:50 warmerda Exp $ */
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Copyright (c) 1988-1997 Sam Leffler
|
* Copyright (c) 1988-1997 Sam Leffler
|
||||||
@ -130,6 +130,7 @@ TIFFWriteDirectory(TIFF* tif)
|
|||||||
_TIFFfree(tif->tif_rawdata);
|
_TIFFfree(tif->tif_rawdata);
|
||||||
tif->tif_rawdata = NULL;
|
tif->tif_rawdata = NULL;
|
||||||
tif->tif_rawcc = 0;
|
tif->tif_rawcc = 0;
|
||||||
|
tif->tif_rawdatasize = 0;
|
||||||
}
|
}
|
||||||
tif->tif_flags &= ~(TIFF_BEENWRITING|TIFF_BUFFERSETUP);
|
tif->tif_flags &= ~(TIFF_BEENWRITING|TIFF_BUFFERSETUP);
|
||||||
|
|
||||||
@ -359,11 +360,7 @@ TIFFWriteDirectory(TIFF* tif)
|
|||||||
* Reset directory-related state for subsequent
|
* Reset directory-related state for subsequent
|
||||||
* directories.
|
* directories.
|
||||||
*/
|
*/
|
||||||
TIFFDefaultDirectory(tif);
|
TIFFCreateDirectory(tif);
|
||||||
tif->tif_diroff = 0;
|
|
||||||
tif->tif_curoff = 0;
|
|
||||||
tif->tif_row = (uint32) -1;
|
|
||||||
tif->tif_curstrip = (tstrip_t) -1;
|
|
||||||
return (1);
|
return (1);
|
||||||
bad:
|
bad:
|
||||||
_TIFFfree(data);
|
_TIFFfree(data);
|
||||||
|
Loading…
Reference in New Issue
Block a user