Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBrecht Van Lommel <brecht@blender.org>2021-09-23 18:38:56 +0300
committerBrecht Van Lommel <brecht@blender.org>2021-09-23 18:48:16 +0300
commitd7f803f522237be41c6ede50dde38b3d6795b161 (patch)
tree43f3c3a7a2e4a9301685e2bc88603467f6bfd243 /intern/cycles/device/device.h
parent6279efbb78a3c701547b8e25cf90efd712c377d0 (diff)
Fix T91641: crash rendering with 16k environment map in Cycles
Protect against integer overflow.
Diffstat (limited to 'intern/cycles/device/device.h')
-rw-r--r--intern/cycles/device/device.h4
1 files changed, 2 insertions, 2 deletions
diff --git a/intern/cycles/device/device.h b/intern/cycles/device/device.h
index 399d5eb91df..3bbad179f52 100644
--- a/intern/cycles/device/device.h
+++ b/intern/cycles/device/device.h
@@ -119,7 +119,7 @@ class Device {
string error_msg;
- virtual device_ptr mem_alloc_sub_ptr(device_memory & /*mem*/, int /*offset*/, int /*size*/)
+ virtual device_ptr mem_alloc_sub_ptr(device_memory & /*mem*/, size_t /*offset*/, size_t /*size*/)
{
/* Only required for devices that implement denoising. */
assert(false);
@@ -273,7 +273,7 @@ class Device {
virtual void mem_alloc(device_memory &mem) = 0;
virtual void mem_copy_to(device_memory &mem) = 0;
- virtual void mem_copy_from(device_memory &mem, int y, int w, int h, int elem) = 0;
+ virtual void mem_copy_from(device_memory &mem, size_t y, size_t w, size_t h, size_t elem) = 0;
virtual void mem_zero(device_memory &mem) = 0;
virtual void mem_free(device_memory &mem) = 0;