* libtiff/tif_dirwrite.c: fix truncation to 32 bit of file offsets in
TIFFLinkDirectory() and TIFFWriteDirectorySec() when aligning directory offsets on a even offset (affects BigTIFF)
This commit is contained in:
parent
845ee2f85b
commit
56ae8c1ee3
@ -1,3 +1,9 @@
|
||||
2015-12-18 Even Rouault <even.rouault at spatialys.com>
|
||||
|
||||
* libtiff/tif_dirwrite.c: fix truncation to 32 bit of file offsets in
|
||||
TIFFLinkDirectory() and TIFFWriteDirectorySec() when aligning directory
|
||||
offsets on a even offset (affects BigTIFF)
|
||||
|
||||
2015-12-12 Even Rouault <even.rouault at spatialys.com>
|
||||
|
||||
* libtiff/tif_write.c: TIFFWriteEncodedStrip() and TIFFWriteEncodedTile()
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* $Id: tif_dirwrite.c,v 1.80 2015-11-22 15:31:03 erouault Exp $ */
|
||||
/* $Id: tif_dirwrite.c,v 1.81 2015-12-18 11:11:00 erouault Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (c) 1988-1997 Sam Leffler
|
||||
@ -780,7 +780,7 @@ TIFFWriteDirectorySec(TIFF* tif, int isimage, int imagedone, uint64* pdiroff)
|
||||
goto bad;
|
||||
}
|
||||
else
|
||||
tif->tif_diroff=(TIFFSeekFile(tif,0,SEEK_END)+1)&(~1U);
|
||||
tif->tif_diroff=(TIFFSeekFile(tif,0,SEEK_END)+1)&(~((toff_t)1));
|
||||
if (pdiroff!=NULL)
|
||||
*pdiroff=tif->tif_diroff;
|
||||
if (!(tif->tif_flags&TIFF_BIGTIFF))
|
||||
@ -2370,7 +2370,7 @@ TIFFLinkDirectory(TIFF* tif)
|
||||
{
|
||||
static const char module[] = "TIFFLinkDirectory";
|
||||
|
||||
tif->tif_diroff = (TIFFSeekFile(tif,0,SEEK_END)+1) &~ 1U;
|
||||
tif->tif_diroff = (TIFFSeekFile(tif,0,SEEK_END)+1) & (~((toff_t)1));
|
||||
|
||||
/*
|
||||
* Handle SubIFDs
|
||||
|
Loading…
Reference in New Issue
Block a user