nvk: fix OOB read inside nvk_get_va_format
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24326>
This commit is contained in:
@@ -305,7 +305,7 @@ static const struct nvk_va_format nvk_vf_formats[] = {
|
||||
const struct nvk_va_format *
|
||||
nvk_get_va_format(const struct nvk_physical_device *pdev, VkFormat format)
|
||||
{
|
||||
if (format > ARRAY_SIZE(nvk_vf_formats))
|
||||
if (format >= ARRAY_SIZE(nvk_vf_formats))
|
||||
return NULL;
|
||||
|
||||
if (nvk_vf_formats[format].bit_widths == 0)
|
||||
|
||||
Reference in New Issue
Block a user