tgsi: fix buffer overflow
authorThomas Hindoe Paaboel Andersen <phomes@gmail.com>
Wed, 13 Apr 2016 01:06:05 +0000 (03:06 +0200)
committerDave Airlie <airlied@redhat.com>
Wed, 13 Apr 2016 01:51:34 +0000 (11:51 +1000)
Increase r to four channels as rgba is written to it
Reviewed-by: Edward O'Callaghan <eocallaghan@alterapraxis.com>
Signed-off-by: Dave Airlie <airlied@redhat.com>
src/gallium/auxiliary/tgsi/tgsi_exec.c

index fb5105173c6db753af780b0c794032fb3083939b..41dd0f0466a28285e78321004aefe9f0a6b6b26e 100644 (file)
@@ -4011,7 +4011,7 @@ static void
 exec_atomop_buf(struct tgsi_exec_machine *mach,
                 const struct tgsi_full_instruction *inst)
 {
-   union tgsi_exec_channel r[3];
+   union tgsi_exec_channel r[4];
    union tgsi_exec_channel value[4], value2[4];
    float rgba[TGSI_NUM_CHANNELS][TGSI_QUAD_SIZE];
    float rgba2[TGSI_NUM_CHANNELS][TGSI_QUAD_SIZE];