egl/dri: Avoid out of bounds array access
authorKevin Strasser <kevin.strasser@intel.com>
Mon, 28 Jan 2019 18:42:44 +0000 (10:42 -0800)
committerEmil Velikov <emil.l.velikov@gmail.com>
Wed, 13 Mar 2019 18:28:53 +0000 (18:28 +0000)
commit70b36c0ef939048acb9c4727b2e4280fc090eb74
treeacf771a21a0b15d9d6b8648a1a185a5b6f919850
parent97ad0efba08d336813366b9cab114c94c2ca61db
egl/dri: Avoid out of bounds array access

indexConfigAttrib iterates over every index in the dri driver, possibly
exceeding __DRI_ATTRIB_MAX. In other words, if the dri driver has newer
attributes libEGL will end up reading from uninitialized memory through
dri2_to_egl_attribute_map[].

Signed-off-by: Kevin Strasser <kevin.strasser@intel.com>
Cc: mesa-stable@lists.freedesktop.org
Reviewed-by: Emil Velikov <emil.velikov@collabora.com>
src/egl/drivers/dri2/egl_dri2.c