[Bf-blender-cvs] [f88776b] master: Fix T39410: Crashes when Saving HiRes .tif

Sergey Sharybin noreply at git.blender.org
Fri Mar 28 10:22:16 CET 2014


Commit: f88776bb5cc5cda8f283ee47992d786e55f88a32
Author: Sergey Sharybin
Date:   Fri Mar 28 15:21:49 2014 +0600
https://developer.blender.org/rBf88776bb5cc5cda8f283ee47992d786e55f88a32

Fix T39410: Crashes when Saving HiRes .tif

===================================================================

M	source/blender/imbuf/intern/tiff.c

===================================================================

diff --git a/source/blender/imbuf/intern/tiff.c b/source/blender/imbuf/intern/tiff.c
index 05e9a4f..eb8f94c 100644
--- a/source/blender/imbuf/intern/tiff.c
+++ b/source/blender/imbuf/intern/tiff.c
@@ -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");




More information about the Bf-blender-cvs mailing list