Skip to content

Commit

Permalink
Fix UAF in debug utils names setup (#2243)
Browse files Browse the repository at this point in the history
  • Loading branch information
HadrienG2 authored Jun 29, 2023
1 parent ac21fa9 commit 65faf9b
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion vulkano/src/device/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1042,7 +1042,9 @@ impl Device {
let info = ash::vk::DebugUtilsObjectNameInfoEXT {
object_type: T::Handle::TYPE,
object_handle: object.handle().as_raw(),
p_object_name: object_name_vk.map_or(ptr::null(), |object_name| object_name.as_ptr()),
p_object_name: object_name_vk
.as_ref()
.map_or(ptr::null(), |object_name| object_name.as_ptr()),
..Default::default()
};

Expand Down

0 comments on commit 65faf9b

Please sign in to comment.