mirror of
https://github.com/lovell/sharp.git
synced 2025-12-19 07:15:08 +01:00
Ensure limitInputPixels uses uint64 (#3349)
This commit is contained in:
committed by
GitHub
parent
f7b29d7b59
commit
eee0dd36d9
@@ -507,9 +507,10 @@ namespace sharp {
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// Limit input images to a given number of pixels, where pixels = width * height
|
||||
if (descriptor->limitInputPixels > 0 &&
|
||||
static_cast<uint64_t>(image.width() * image.height()) > descriptor->limitInputPixels) {
|
||||
static_cast<uint64_t>(image.width()) * image.height() > descriptor->limitInputPixels) {
|
||||
throw vips::VError("Input image exceeds pixel limit");
|
||||
}
|
||||
return std::make_tuple(image, imageType);
|
||||
|
||||
Reference in New Issue
Block a user