Fix T39410: Crashes when Saving HiRes .tif
authorSergey Sharybin <sergey.vfx@gmail.com>
Fri, 28 Mar 2014 09:21:49 +0000 (15:21 +0600)
committerSergey Sharybin <sergey.vfx@gmail.com>
Fri, 28 Mar 2014 09:22:10 +0000 (15:22 +0600)
source/blender/imbuf/intern/tiff.c

index 05e9a4fa134e5e29a802e5cd47bbb8e15bc89078..eb8f94cbc6e40cd164994925ea676795947d2c21 100644 (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");