mirror of
https://github.com/webmproject/libwebp.git
synced 2025-07-15 13:29:54 +02:00
tiffdec: restore libtiff 3.9.x compatibility
use tsize_t which is equivalent (for now) to tmsize_t added in version 4 Change-Id: I7489ef7b39d9a3692a4b952de22476b245240ed1
This commit is contained in:
@ -153,9 +153,9 @@ int ReadTIFF(const uint8_t* const data, size_t data_size,
|
|||||||
}
|
}
|
||||||
// _Tiffmalloc uses a signed type for size.
|
// _Tiffmalloc uses a signed type for size.
|
||||||
alloc_size = (int64_t)((uint64_t)width * height * sizeof(*raster));
|
alloc_size = (int64_t)((uint64_t)width * height * sizeof(*raster));
|
||||||
if (alloc_size < 0 || alloc_size != (tmsize_t)alloc_size) goto End;
|
if (alloc_size < 0 || alloc_size != (tsize_t)alloc_size) goto End;
|
||||||
|
|
||||||
raster = (uint32*)_TIFFmalloc((tmsize_t)alloc_size);
|
raster = (uint32*)_TIFFmalloc((tsize_t)alloc_size);
|
||||||
if (raster != NULL) {
|
if (raster != NULL) {
|
||||||
if (TIFFReadRGBAImageOriented(tif, width, height, raster,
|
if (TIFFReadRGBAImageOriented(tif, width, height, raster,
|
||||||
ORIENTATION_TOPLEFT, 1)) {
|
ORIENTATION_TOPLEFT, 1)) {
|
||||||
|
Reference in New Issue
Block a user