mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-01-06 06:40:08 +01:00
vulkan/wsi/wayland: fix unaligned load of dev_t
Fixes the following UBSan error:
../src/vulkan/wsi/wsi_common_wayland.c:654:27: runtime error: load of misaligned address 0x6110000666b4 for type 'dev_t' (aka 'unsigned long'), which requires 8 byte alignment
Signed-off-by: Simon Ser <contact@emersion.fr>
Reviewed-by: Leandro Ribeiro <leandro.ribeiro@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/19595>
This commit is contained in:
parent
ad5c9c3fa4
commit
145cb3e349
1 changed files with 1 additions and 2 deletions
|
|
@ -647,8 +647,7 @@ default_dmabuf_feedback_main_device(void *data,
|
|||
struct wsi_wl_display *display = data;
|
||||
|
||||
assert(device->size == sizeof(dev_t));
|
||||
dev_t *dev = device->data;
|
||||
display->main_device = *dev;
|
||||
memcpy(&display->main_device, device->data, device->size);
|
||||
}
|
||||
|
||||
static void
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue