Fixed warning.

This commit is contained in:
Бранимир Караџић
2019-02-04 22:21:54 -08:00
parent 27afda86ed
commit d22f204190

View File

@@ -10855,8 +10855,8 @@ static int DecodeChunk(EXRImage *exr_image, const EXRHeader *exr_header,
} else { // scanline format
// Don't allow too large image(256GB * pixel_data_size or more). Workaround for #104.
size_t data_len = size_t(data_width) * size_t(data_height) * size_t(num_channels);
if ((data_len == 0) || (data_len >= 0x4000000000)) {
size_t data_len0 = size_t(data_width) * size_t(data_height) * size_t(num_channels);
if ((data_len0 == 0) || (data_len0 >= 0x4000000000)) {
if (err) {
std::stringstream ss;
ss << "Image data size is zero or too large: width = " << data_width << ", height = " << data_height << ", channels = " << num_channels << std::endl;