diff options
author | Scott D Phillips <[email protected]> | 2018-03-19 15:39:25 -0700 |
---|---|---|
committer | Scott D Phillips <[email protected]> | 2018-03-20 07:58:10 -0700 |
commit | d849d36c6cc99cb7a7ad4b285e3e896d593da07b (patch) | |
tree | 791b0fbf669bd1c4e8929daf3bb9c17fcaef07e1 /src | |
parent | 035cc7a12dc03ef8b8184f75b880ae41e452b215 (diff) |
anv: off-by-one in GetDescriptorSetLayoutSupport
Loop was accessing one more than bindingCount elements from
pBindings, accessing uninitialized memory.
Fixes: ddc4069122 ("anv: Implement VK_KHR_maintenance3")
Reviewed-by: Nanley Chery <[email protected]>
Reviewed-by: Lionel Landwerlin <[email protected]>
Diffstat (limited to 'src')
-rw-r--r-- | src/intel/vulkan/anv_descriptor_set.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/intel/vulkan/anv_descriptor_set.c b/src/intel/vulkan/anv_descriptor_set.c index 2a3c496a9f8..67511e4b286 100644 --- a/src/intel/vulkan/anv_descriptor_set.c +++ b/src/intel/vulkan/anv_descriptor_set.c @@ -42,7 +42,7 @@ void anv_GetDescriptorSetLayoutSupport( { uint32_t surface_count[MESA_SHADER_STAGES] = { 0, }; - for (uint32_t b = 0; b <= pCreateInfo->bindingCount; b++) { + for (uint32_t b = 0; b < pCreateInfo->bindingCount; b++) { const VkDescriptorSetLayoutBinding *binding = &pCreateInfo->pBindings[b]; switch (binding->descriptorType) { |