[Piglit] [PATCH] ext_transform_feedback-position: Fix out-of-bounds write.

Marek Olšák maraeo at gmail.com
Thu Sep 8 13:51:43 PDT 2011


Looks good to me.

Marek

On Thu, Sep 8, 2011 at 8:26 PM, Vinson Lee <vlee at vmware.com> wrote:
> ext_transform_feedback-position: Fix out-of-bounds write.
>
> Fixes a Coverity out-of-bounds write defect.
>
> diff --git a/tests/spec/ext_transform_feedback/position.c b/tests/spec/ext_transform_feedback/position.c
> index b28ecec..e952dcd 100644
> --- a/tests/spec/ext_transform_feedback/position.c
> +++ b/tests/spec/ext_transform_feedback/position.c
> @@ -72,7 +72,7 @@ void piglit_init(int argc, char **argv)
>        unsigned i;
>        float data[BUF_FLOATS];
>
> -       for (i = 0; i < sizeof(data); i++) {
> +       for (i = 0; i < BUF_FLOATS; i++) {
>                data[i] = DEFAULT_VALUE;
>        }
> _______________________________________________
> Piglit mailing list
> Piglit at lists.freedesktop.org
> http://lists.freedesktop.org/mailman/listinfo/piglit
>


More information about the Piglit mailing list