Skip to content
Snippets Groups Projects
Commit 2fee8403 authored by Harry Wentland's avatar Harry Wentland Committed by Melissa Wen
Browse files

drm/vkms: Avoid reading beyond LUT array


When the floor LUT index (drm_fixp2int(lut_index) is the last
index of the array the ceil LUT index will point to an entry
beyond the array. Make sure we guard against it and use the
value of the floor LUT index.

v3:
 - Drop bits from commit description that didn't contribute
   anything of value

Fixes: db1f254f ("drm/vkms: Add support to 1D gamma LUT")
Signed-off-by: default avatarHarry Wentland <harry.wentland@amd.com>
Cc: Arthur Grillo <arthurgrillo@riseup.net>
Reviewed-by: default avatarArthur Grillo <arthurgrillo@riseup.net>
Reviewed-by: default avatarMelissa Wen <mwen@igalia.com>
Signed-off-by: default avatarMelissa Wen <melissa.srw@gmail.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20231108163647.106853-6-harry.wentland@amd.com
parent ffcc67cd
No related branches found
No related tags found
No related merge requests found
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment