Topi Pohjolainen <[email protected]> writes:
> +static void
> +fill_one_missing(const EGLint *all, EGLint *out, EGLint missing)
> +{
> +     unsigned i;
> +
> +     for (i = 0; i < NUM_MANDATORY_ATTRS; ++i) {
> +             if (all[2 * i] != missing) {
> +                     out[2 * i + 0] = all[2 * i + 0];
> +                     out[2 * i + 1] = all[2 * i + 1];
> +             }
> +     }
> +
> +     out[i] = EGL_NONE;

I think you meant to pack things into out[] with the missing attribute
skipped.  As is, it looks like you overflow the out[] buffer on the
stack in the caller, and there's a hole in the middle with undefined
data passed in.

Attachment: pgpNbpLfkW_9J.pgp
Description: PGP signature

_______________________________________________
Piglit mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/piglit

Reply via email to