Skip to content

Commit

Permalink
Vulkan: fix stack use-after-free (#6639)
Browse files Browse the repository at this point in the history
  • Loading branch information
bejado authored Mar 14, 2023
1 parent dd654c5 commit efdc801
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions filament/backend/src/vulkan/VulkanDriver.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1016,10 +1016,10 @@ void VulkanDriver::beginRenderPass(Handle<HwRenderTarget> rth, const RenderPassP

rt->transformClientRectToPlatform(&renderPassInfo.renderArea);

VkClearValue clearValues[
MRT::MAX_SUPPORTED_RENDER_TARGET_COUNT + MRT::MAX_SUPPORTED_RENDER_TARGET_COUNT +
1] = {};
if (params.flags.clear != TargetBufferFlags::NONE) {
VkClearValue clearValues[
MRT::MAX_SUPPORTED_RENDER_TARGET_COUNT + MRT::MAX_SUPPORTED_RENDER_TARGET_COUNT +
1] = {};

// NOTE: clearValues must be populated in the same order as the attachments array in
// VulkanFboCache::getFramebuffer. Values must be provided regardless of whether Vulkan is
Expand Down

0 comments on commit efdc801

Please sign in to comment.