[Mesa-dev] [PATCH] anv: off-by-one in GetDescriptorSetLayoutSupport
Nanley Chery
nanleychery at gmail.com
Mon Mar 19 23:05:12 UTC 2018
On Mon, Mar 19, 2018 at 03:39:25PM -0700, Scott D Phillips wrote:
> Loop was accessing one more than bindingCount elements from
> pBindings, accessing uninitialized memory.
>
> Fixes: ddc4069122 ("anv: Implement VK_KHR_maintenance3")
> ---
> src/intel/vulkan/anv_descriptor_set.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
This patch is
Reviewed-by: Nanley Chery <nanley.g.chery at intel.com>
> diff --git a/src/intel/vulkan/anv_descriptor_set.c b/src/intel/vulkan/anv_descriptor_set.c
> index 2a3c496a9f..67511e4b28 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) {
> --
> 2.14.3
>
> _______________________________________________
> mesa-dev mailing list
> mesa-dev at lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/mesa-dev
More information about the mesa-dev
mailing list