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 <nanley.g.chery@intel.com>
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
This commit is contained in:
@@ -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) {
|
||||
|
Reference in New Issue
Block a user