radv: Avoid calling memcpy with null pointers
authorTony Wasserka <tony.wasserka@gmx.de>
Tue, 15 Sep 2020 11:07:16 +0000 (13:07 +0200)
committerMarge Bot <eric+marge@anholt.net>
Wed, 7 Oct 2020 19:50:01 +0000 (19:50 +0000)
commit984dcfc59faa1e50dd9e9aa59e3e80582157792f
treedc3db985b8b4f268901af533a48c1da9f0aeb39d
parent0ef2f1d4a0096316f2aa4a887882d262c5294084
radv: Avoid calling memcpy with null pointers

Vulkan allows for these input pointers to be null when the respective
object count is zero. Calling memcpy with null pointers is undefined,
so they are guarded with a check for the legit use pattern now.

Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6728>
src/amd/vulkan/radv_device.c