mirror of
https://github.com/python-pillow/Pillow.git
synced 2024-12-25 17:36:18 +03:00
Fix for issue #2206
This commit is contained in:
parent
01392fcb2e
commit
76b1eb242e
|
@ -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;
|
||||
|
|
Loading…
Reference in New Issue
Block a user