summaryrefslogtreecommitdiffstats
path: root/src/gallium/auxiliary/tgsi
diff options
context:
space:
mode:
authorSamuel Pitoiset <[email protected]>2016-03-31 10:54:17 +0200
committerDave Airlie <[email protected]>2016-04-01 07:15:16 +1000
commit05902a668611094ec876929fc2dfe1172043e4b9 (patch)
tree909aed0b389228d8d2065473c7d7845c38e2b4be /src/gallium/auxiliary/tgsi
parent9076e049340db0c55f57abb4ee9bbaffba61d45d (diff)
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 <[email protected]> Reviewed-by: Brian Paul <[email protected]> Reviewed-by: Dave Airlie <[email protected]>
Diffstat (limited to 'src/gallium/auxiliary/tgsi')
-rw-r--r--src/gallium/auxiliary/tgsi/tgsi_exec.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/gallium/auxiliary/tgsi/tgsi_exec.c b/src/gallium/auxiliary/tgsi/tgsi_exec.c
index e7f080eb123..72d8c5a7247 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];