mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-01-19 17:40:32 +01:00
radv: fix copying mutable descriptors to sampler descriptors
This fixes a heap-buffer-overflow detected by ASAN. Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com> Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/14330>
This commit is contained in:
parent
6fee84bc2e
commit
ce5d7bf508
1 changed files with 4 additions and 2 deletions
|
|
@ -1283,8 +1283,10 @@ radv_update_descriptor_sets_impl(struct radv_device *device, struct radv_cmd_buf
|
|||
dst_ptr += dst_binding_layout->size / 4;
|
||||
|
||||
if (src_binding_layout->type != VK_DESCRIPTOR_TYPE_SAMPLER &&
|
||||
src_binding_layout->type != VK_DESCRIPTOR_TYPE_ACCELERATION_STRUCTURE_KHR) {
|
||||
/* Sampler descriptors don't have a buffer list. */
|
||||
dst_binding_layout->type != VK_DESCRIPTOR_TYPE_SAMPLER &&
|
||||
src_binding_layout->type != VK_DESCRIPTOR_TYPE_ACCELERATION_STRUCTURE_KHR &&
|
||||
dst_binding_layout->type != VK_DESCRIPTOR_TYPE_ACCELERATION_STRUCTURE_KHR) {
|
||||
/* Sampler/acceleration structure descriptors don't have a buffer list. */
|
||||
dst_buffer_list[j] = src_buffer_list[j];
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue