mirror of
https://github.com/python-pillow/Pillow.git
synced 2025-06-03 04:33:31 +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;
|
tdata_t new;
|
||||||
tsize_t newsize=state->size;
|
tsize_t newsize=state->size;
|
||||||
while (newsize < (size + state->size)) {
|
while (newsize < (size + state->size)) {
|
||||||
if (newsize > (tsize_t)SIZE_MAX - 64*1024){
|
if (newsize > INT_MAX - 64*1024){
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
newsize += 64*1024;
|
newsize += 64*1024;
|
||||||
|
|
Loading…
Reference in New Issue
Block a user