Fix drmModeCreatePropertyBlob() length parameter after f894801fa2

Fixes: f894801fa ("xfree86: modesetting: don't use VLA")
Part-of: <https://gitlab.freedesktop.org/xorg/xserver/-/merge_requests/2011>
(cherry picked from commit 772cb30448)
This commit is contained in:
Matthieu Herrb 2025-06-09 18:27:40 +02:00 committed by Alan Coopersmith
parent 3eac9393d7
commit 5eccd05b61

View file

@ -1927,7 +1927,9 @@ drmmode_set_gamma_lut(drmmode_crtc_private_ptr drmmode_crtc,
}
uint32_t blob_id;
if (drmModeCreatePropertyBlob(drmmode->fd, lut, sizeof(lut), &blob_id)) {
if (drmModeCreatePropertyBlob(drmmode->fd, lut,
sizeof(struct drm_color_lut) * size,
&blob_id)) {
free(lut);
return;
}