fix vips image writes of more than 2gb
With very wide images and huge numbers of threads, it was possible to trigger an int overflow in write_vips(). Thanks @erdmann See https://github.com/libvips/libvips/issues/1306
This commit is contained in:
parent
bcdaeca578
commit
3921e63561
@ -635,7 +635,7 @@ write_vips( VipsRegion *region, VipsRect *area, void *a, void *b )
|
|||||||
size_t nwritten, count;
|
size_t nwritten, count;
|
||||||
void *buf;
|
void *buf;
|
||||||
|
|
||||||
count = region->bpl * area->height;
|
count = (size_t) region->bpl * area->height;
|
||||||
buf = VIPS_REGION_ADDR( region, 0, area->top );
|
buf = VIPS_REGION_ADDR( region, 0, area->top );
|
||||||
|
|
||||||
do {
|
do {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user