Fix T39410: Crashes when Saving HiRes .tif

This commit is contained in:
Sergey Sharybin 2014-03-28 15:21:49 +06:00
parent 29888dcea0
commit f88776bb5c
Notes: blender-bot 2023-02-14 10:54:33 +01:00
Referenced by issue #39410, Crashes when Saving HiRes .tif
1 changed files with 1 additions and 1 deletions

View File

@ -859,7 +859,7 @@ int imb_savetiff(ImBuf *ibuf, const char *name, int flags)
TIFFSetField(image, TIFFTAG_RESOLUTIONUNIT, RESUNIT_INCH);
if (TIFFWriteEncodedStrip(image, 0,
(bitspersample == 16) ? (unsigned char *)pixels16 : pixels,
ibuf->x * ibuf->y * samplesperpixel * bitspersample / 8) == -1)
(size_t)ibuf->x * ibuf->y * samplesperpixel * bitspersample / 8) == -1)
{
fprintf(stderr,
"imb_savetiff: Could not write encoded TIFF.\n");