egl_util_run() does 'goto fail;' on error paths. The error paths perform cleanup based on the current values of state's fields. However, since state isn't zero-initialized, these fields hold random values in the error paths, potentially causing crashes.
Signed-off-by: Daniel Kurtz <[email protected]> --- I do not have commit access, so can someone please submit this for me if it looks good? Thanks -djk tests/egl/egl-util.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/egl/egl-util.c b/tests/egl/egl-util.c index 5b36d6d..99d6840 100644 --- a/tests/egl/egl-util.c +++ b/tests/egl/egl-util.c @@ -190,7 +190,7 @@ check_extensions(struct egl_state *state, const struct egl_test *test) enum piglit_result egl_util_run(const struct egl_test *test, int argc, char *argv[]) { - struct egl_state state; + struct egl_state state = { 0 }; EGLint count; enum piglit_result result = PIGLIT_PASS; int i, dispatch_api, api_bit = EGL_OPENGL_BIT; -- 2.0.0.526.g5318336 _______________________________________________ Piglit mailing list [email protected] http://lists.freedesktop.org/mailman/listinfo/piglit
