diff --git a/rtengine/rawimage.cc b/rtengine/rawimage.cc index de392623d..8d7292113 100644 --- a/rtengine/rawimage.cc +++ b/rtengine/rawimage.cc @@ -695,7 +695,7 @@ float** RawImage::compress_image(int frameNum, bool freeImage) } else if (colors == 1) { // Monochrome if (!allocation) { - allocation = new float[height * width]; + allocation = new float[static_cast(height) * static_cast(width)]; data = new float*[height]; for (int i = 0; i < height; i++) { @@ -704,7 +704,7 @@ float** RawImage::compress_image(int frameNum, bool freeImage) } } else { if (!allocation) { - allocation = new float[3 * height * width]; + allocation = new float[3UL * static_cast(height) * static_cast(width)]; data = new float*[height]; for (int i = 0; i < height; i++) {