From 76b1eb242ef54aaa3e3b50ba07051f7534bc0438 Mon Sep 17 00:00:00 2001 From: wiredfool Date: Wed, 23 Nov 2016 06:14:06 -0800 Subject: [PATCH] Fix for issue #2206 --- libImaging/TiffDecode.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libImaging/TiffDecode.c b/libImaging/TiffDecode.c index 8793f2b3469..f292da3883d 100644 --- a/libImaging/TiffDecode.c +++ b/libImaging/TiffDecode.c @@ -58,7 +58,7 @@ tsize_t _tiffWriteProc(thandle_t hdata, tdata_t buf, tsize_t size) { tdata_t new; tsize_t newsize=state->size; while (newsize < (size + state->size)) { - if (newsize > (tsize_t)SIZE_MAX - 64*1024){ + if (newsize > INT_MAX - 64*1024){ return 0; } newsize += 64*1024;