[Mesa-dev] [PATCH 1/2] tgsi: fix out of bounds access in exec_atomop()

Brian Paul brianp at vmware.com
Thu Mar 31 15:50:51 UTC 2016


On 03/31/2016 02:54 AM, Samuel Pitoiset wrote:
> 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 <samuel.pitoiset at gmail.com>
> Cc: Dave Airlie <airlied at redhat.com>
> ---
>   src/gallium/auxiliary/tgsi/tgsi_exec.c | 2 +-
>   1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/src/gallium/auxiliary/tgsi/tgsi_exec.c b/src/gallium/auxiliary/tgsi/tgsi_exec.c
> index 53d5937..729c222 100644
> --- a/src/gallium/auxiliary/tgsi/tgsi_exec.c
> +++ b/src/gallium/auxiliary/tgsi/tgsi_exec.c
> @@ -3852,7 +3852,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];
>

For both, Reviewed-by: Brian Paul <brianp at vmware.com>



More information about the mesa-dev mailing list