Do not overflow when copy data
authorJuan A. Suarez Romero <jasuarez@igalia.com>
Wed, 18 Aug 2021 11:01:15 +0000 (13:01 +0200)
committerAlexander Galazin <galazin@protonmail.com>
Thu, 26 Aug 2021 11:37:57 +0000 (11:37 +0000)
commit83f57ceb946ffbfc023065c46549bc5be21e2825
tree140e3bf1386903b406f9b2652162c46b4068c98b
parentc56e13c67e70d86fa9679cce6c4fcae263eb9f32
Do not overflow when copy data

As `vertexDataSize` is aligned with `nonCoherentAtomSize`, it could be
bigger than the actual size of m_data.

This is actually causing a heap-buffer overflow when executing in our
Rpi4 Vulkan driver.

Affected tests:
dEQP-VK.spirv_assembly.instruction.graphics.cross_stage.basic_type.flat

Components: Vulkan

VK-GL-CTS issue: 3062

Change-Id: I6b1f449e9f0a42740adb051ed037ff911dac763a
external/vulkancts/modules/vulkan/spirv_assembly/vktSpvAsmCrossStageInterfaceTests.cpp