mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-01-08 12:50:12 +01:00
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:
parent
6ba98ca4a1
commit
3f16c30516
1 changed files with 1 additions and 1 deletions
|
|
@ -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)
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue