This fixes a buffer overflow in an array of write descriptor sets.

This commit is contained in:
Abraham Stolk
2020-01-30 12:03:06 -08:00
committed by Бранимир Караџић
parent 87eac9ed06
commit 2efeada1c0

View File

@@ -3651,8 +3651,8 @@ VK_IMPORT_DEVICE
VkDescriptorImageInfo imageInfo[BGFX_CONFIG_MAX_TEXTURE_SAMPLERS];
VkDescriptorBufferInfo bufferInfo[BGFX_CONFIG_MAX_TEXTURE_SAMPLERS];
VkWriteDescriptorSet wds[BGFX_CONFIG_MAX_TEXTURE_SAMPLERS];
bx::memSet(wds, 0, sizeof(VkWriteDescriptorSet) * BGFX_CONFIG_MAX_TEXTURE_SAMPLERS);
VkWriteDescriptorSet wds[BGFX_CONFIG_MAX_TEXTURE_SAMPLERS+2];
bx::memSet(wds, 0, sizeof(VkWriteDescriptorSet) * BGFX_CONFIG_MAX_TEXTURE_SAMPLERS+2);
uint32_t wdsCount = 0;
uint32_t bufferCount = 0;
uint32_t imageCount = 0;