Fix for issue #2206

This commit is contained in:
wiredfool 2016-11-23 06:14:06 -08:00
parent 01392fcb2e
commit 76b1eb242e

View File

@ -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;