OSDN Git Service

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>
Fri, 15 Mar 2019 14:31:25 +0000 (14:31 +0000)
commitbdd5f24c1b1bd94b8725263cf287c5987fe7229a
treeae92c8a373892224270e674d1b46538e4c94f18b
parent4f30487a80194b80af2670b4e7da751d383678d3
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>
(cherry picked from commit 70b36c0ef939048acb9c4727b2e4280fc090eb74)
src/egl/drivers/dri2/egl_dri2.c