Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit ec5be46d authored by Gary King's avatar Gary King Committed by Brint E. Kriebel
Browse files

[egl] return error code for NULL num_config output parameter

if a client passes NULL for num_config to eglGetConfigs, set
EGL_BAD_PARAMETER and return rather than crash

Change-Id: I62d3843b67289a1da50ec94f2d558c2ab17f662c
parent 28806637
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -839,6 +839,7 @@ EGLBoolean eglGetConfigs( EGLDisplay dpy,
{
    egl_display_t const * const dp = get_display(dpy);
    if (!dp) return setError(EGL_BAD_DISPLAY, EGL_FALSE);
    if (!num_config) return setError(EGL_BAD_PARAMETER, EGL_FALSE);

    GLint numConfigs = dp->numTotalConfigs;
    if (!configs) {