[Bf-blender-cvs] [47eccac21c1] master: GPUShaderInterface: Fix out of bound reads

Clément Foucault noreply at git.blender.org
Tue Jun 2 23:47:16 CEST 2020


Commit: 47eccac21c173440ab3e26954babe2e9a6165f57
Author: Clément Foucault
Date:   Tue Jun 2 22:35:37 2020 +0200
Branches: master
https://developer.blender.org/rB47eccac21c173440ab3e26954babe2e9a6165f57

GPUShaderInterface: Fix out of bound reads

===================================================================

M	source/blender/gpu/intern/gpu_shader_interface.c

===================================================================

diff --git a/source/blender/gpu/intern/gpu_shader_interface.c b/source/blender/gpu/intern/gpu_shader_interface.c
index a1d75452458..84be8affc16 100644
--- a/source/blender/gpu/intern/gpu_shader_interface.c
+++ b/source/blender/gpu/intern/gpu_shader_interface.c
@@ -395,7 +395,7 @@ GPUShaderInterface *GPU_shaderinterface_create(int32_t program)
   }
   if (shaderface->enabled_tex_mask > 0) {
     printf("Samplers {\n");
-    for (int i = 0; i < shaderface->ubo_len; i++) {
+    for (int i = 0; i < shaderface->uniform_len; i++) {
       GPUShaderInput *input = shaderface->inputs + shaderface->attribute_len +
                               shaderface->ubo_len + i;
       if (input->binding != -1) {



More information about the Bf-blender-cvs mailing list