Skip to content

Commit

Permalink
Fix for issue python-pillow#2206
Browse files Browse the repository at this point in the history
  • Loading branch information
wiredfool committed Nov 23, 2016
1 parent 01392fc commit 76b1eb2
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion libImaging/TiffDecode.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit 76b1eb2

Please sign in to comment.