[Mesa-dev] [PATCH] radeonsi: fix bounds check in si_create_vertex_elements

Bas Nieuwenhuizen bas at basnieuwenhuizen.nl
Tue Apr 12 17:55:24 UTC 2016


Reviewed-by: Bas Nieuwenhuizen <bas at basnieuwenhuizen.nl>

On Tue, Apr 12, 2016 at 7:25 PM, Nicolai Hähnle <nhaehnle at gmail.com> wrote:
> From: Nicolai Hähnle <nicolai.haehnle at amd.com>
>
> This was triggered by
> dEQP-GLES3.functional.vertex_array_objects.all_attributes
>
> Cc: "11.1 11.2" <mesa-stable at lists.freedesktop.org>
> ---
>  src/gallium/drivers/radeonsi/si_state.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/src/gallium/drivers/radeonsi/si_state.c b/src/gallium/drivers/radeonsi/si_state.c
> index 85ee1c4..664506e 100644
> --- a/src/gallium/drivers/radeonsi/si_state.c
> +++ b/src/gallium/drivers/radeonsi/si_state.c
> @@ -3278,7 +3278,7 @@ static void *si_create_vertex_elements(struct pipe_context *ctx,
>         struct si_vertex_element *v = CALLOC_STRUCT(si_vertex_element);
>         int i;
>
> -       assert(count < SI_MAX_ATTRIBS);
> +       assert(count <= SI_MAX_ATTRIBS);
>         if (!v)
>                 return NULL;
>
> --
> 2.5.0
>
> _______________________________________________
> mesa-dev mailing list
> mesa-dev at lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/mesa-dev


More information about the mesa-dev mailing list