intel/vec4: fix out of bounds read
authorMarcin Ślusarz <marcin.slusarz@intel.com>
Fri, 24 Jul 2020 18:13:00 +0000 (20:13 +0200)
committerMarge Bot <eric+marge@anholt.net>
Thu, 30 Jul 2020 10:41:00 +0000 (10:41 +0000)
commitcb19fe24d361991104f8dcf54d1e807998766be1
tree573e93eaf4dc886bd3a589d00604a30ded468a54
parent56228b03937bb4181f8e5eec00490b2769b3185c
intel/vec4: fix out of bounds read

NIR_MAX_VEC_COMPONENTS was bumped from 4 to 16 in a8ec4082
(2019.03.09, merged 2019.12.21)

float[4] array was added in acd7796a
(2019.06.11, merged 2019.07.11)

Found by Coverity.
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/3014
Signed-off-by: Marcin Ślusarz <marcin.slusarz@intel.com>
Fixes: a8ec4082a41 ("nir+vtn: vec8+vec16 support")
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6067>
src/intel/compiler/brw_vec4_nir.cpp