From: Samuel Pitoiset Date: Thu, 31 Mar 2016 08:54:17 +0000 (+0200) Subject: tgsi: fix out of bounds access in exec_atomop() X-Git-Tag: upstream/17.1.0~11461 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=05902a668611094ec876929fc2dfe1172043e4b9;p=platform%2Fupstream%2Fmesa.git tgsi: fix out of bounds access in exec_atomop() The number of channels must be 4 for all RGBA components. Fixes: 22d129601 ("tgsi: add support for image operations to tgsi_exec. (v2.1)") Signed-off-by: Samuel Pitoiset Reviewed-by: Brian Paul Reviewed-by: Dave Airlie --- diff --git a/src/gallium/auxiliary/tgsi/tgsi_exec.c b/src/gallium/auxiliary/tgsi/tgsi_exec.c index e7f080e..72d8c5a 100644 --- a/src/gallium/auxiliary/tgsi/tgsi_exec.c +++ b/src/gallium/auxiliary/tgsi/tgsi_exec.c @@ -3853,7 +3853,7 @@ static void exec_atomop(struct tgsi_exec_machine *mach, const struct tgsi_full_instruction *inst) { - union tgsi_exec_channel r[3], sample_r; + union tgsi_exec_channel r[4], sample_r; union tgsi_exec_channel value[4], value2[4]; float rgba[TGSI_NUM_CHANNELS][TGSI_QUAD_SIZE]; float rgba2[TGSI_NUM_CHANNELS][TGSI_QUAD_SIZE];