Fix possible integer overflow in Cycles baking
Ensure math happens on size_t type instead of int followed by a cast to the size_t.
This commit is contained in:
parent
3021babf38
commit
9c412b6e2d
|
@ -96,7 +96,7 @@ static void pad_pixels(const BufferParams &buffer_params,
|
|||
return;
|
||||
}
|
||||
|
||||
const size_t size = buffer_params.width * buffer_params.height;
|
||||
const size_t size = static_cast<size_t>(buffer_params.width) * buffer_params.height;
|
||||
if (destination.pixels) {
|
||||
float *pixel = destination.pixels;
|
||||
|
||||
|
|
Loading…
Reference in New Issue