diff options
author | Sergey Sharybin <sergey.vfx@gmail.com> | 2016-07-26 17:56:40 +0300 |
---|---|---|
committer | Sergey Sharybin <sergey.vfx@gmail.com> | 2016-07-26 18:16:23 +0300 |
commit | f31f740bd03503e98a2a0818ef52cfcf577ac1fd (patch) | |
tree | b9d0a57193204fdbb36b7efb3d8fcaa43a4bbb02 | |
parent | 70307941715f1274b9ca7f859fcc93ab5f5c5c66 (diff) |
Cycles: Proper fix for buffer overflow in volume intersect all
-rw-r--r-- | intern/cycles/kernel/kernel_volume.h | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/intern/cycles/kernel/kernel_volume.h b/intern/cycles/kernel/kernel_volume.h index bf8301fe5fb..01c87e6d89d 100644 --- a/intern/cycles/kernel/kernel_volume.h +++ b/intern/cycles/kernel/kernel_volume.h @@ -1029,7 +1029,7 @@ ccl_device void kernel_volume_stack_init(KernelGlobals *kg, int stack_index = 0, enclosed_index = 0; #ifdef __VOLUME_RECORD_ALL__ - Intersection hits[2*VOLUME_STACK_SIZE]; + Intersection hits[2*VOLUME_STACK_SIZE + 1]; uint num_hits = scene_intersect_volume_all(kg, &volume_ray, hits, @@ -1199,7 +1199,7 @@ ccl_device void kernel_volume_stack_update_for_subsurface(KernelGlobals *kg, Ray volume_ray = *ray; # ifdef __VOLUME_RECORD_ALL__ - Intersection hits[2*VOLUME_STACK_SIZE]; + Intersection hits[2*VOLUME_STACK_SIZE + 1]; uint num_hits = scene_intersect_volume_all(kg, &volume_ray, hits, |