radv: skip zero-sized memcpy
authorRhys Perry <pendingchaos02@gmail.com>
Wed, 27 Sep 2023 11:51:15 +0000 (12:51 +0100)
committerMarge Bot <emma+marge@anholt.net>
Mon, 23 Oct 2023 22:16:26 +0000 (22:16 +0000)
commit99214f048193f97fd4bc2dc0483d796b7a0f18d2
tree01c4e31ec13e1725f3f175430ecaeb89df8b3adc
parentd57611fe25f45c63b6bcd774e844a4e32c9c9cf3
radv: skip zero-sized memcpy

Fixes UBSan:
src/amd/vulkan/radv_pipeline.c:1181:4: runtime error: null pointer passed as argument 2, which is declared to never be null
src/amd/vulkan/radv_shader.c:2243:4: runtime error: null pointer passed as argument 2, which is declared to never be null

Signed-off-by: Rhys Perry <pendingchaos02@gmail.com>
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/25432>
src/amd/vulkan/radv_pipeline.c
src/amd/vulkan/radv_shader.c