Fix unintended sign extent (Coverity)
Would hit us at 716Mpx (26755px²).
This commit is contained in:
@@ -695,7 +695,7 @@ float** RawImage::compress_image(int frameNum, bool freeImage)
|
|||||||
} else if (colors == 1) {
|
} else if (colors == 1) {
|
||||||
// Monochrome
|
// Monochrome
|
||||||
if (!allocation) {
|
if (!allocation) {
|
||||||
allocation = new float[height * width];
|
allocation = new float[static_cast<unsigned long>(height) * static_cast<unsigned long>(width)];
|
||||||
data = new float*[height];
|
data = new float*[height];
|
||||||
|
|
||||||
for (int i = 0; i < height; i++) {
|
for (int i = 0; i < height; i++) {
|
||||||
@@ -704,7 +704,7 @@ float** RawImage::compress_image(int frameNum, bool freeImage)
|
|||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
if (!allocation) {
|
if (!allocation) {
|
||||||
allocation = new float[3 * height * width];
|
allocation = new float[3UL * static_cast<unsigned long>(height) * static_cast<unsigned long>(width)];
|
||||||
data = new float*[height];
|
data = new float*[height];
|
||||||
|
|
||||||
for (int i = 0; i < height; i++) {
|
for (int i = 0; i < height; i++) {
|
||||||
|
Reference in New Issue
Block a user