diff options
author | Gary King <gking@nvidia.com> | 2010-02-09 16:29:32 -0800 |
---|---|---|
committer | Brint E. Kriebel <github@bekit.net> | 2010-11-14 22:25:11 -0700 |
commit | bcee4ac25210c8dea1e94eec9e1b77cefe17b35d (patch) | |
tree | 22fea46398468f111824e174a64d7158a912e423 /opengl | |
parent | d22010744720577f147da001bf257dcddaed00da (diff) | |
download | frameworks_base-bcee4ac25210c8dea1e94eec9e1b77cefe17b35d.zip frameworks_base-bcee4ac25210c8dea1e94eec9e1b77cefe17b35d.tar.gz frameworks_base-bcee4ac25210c8dea1e94eec9e1b77cefe17b35d.tar.bz2 |
[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: I412cce9a89cbe4fc4270b1444d21601633c21d21
Diffstat (limited to 'opengl')
-rw-r--r-- | opengl/libs/EGL/egl.cpp | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/opengl/libs/EGL/egl.cpp b/opengl/libs/EGL/egl.cpp index eeb587a..f3b4e36 100644 --- a/opengl/libs/EGL/egl.cpp +++ b/opengl/libs/EGL/egl.cpp @@ -811,6 +811,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) { |