summaryrefslogtreecommitdiffstats
path: root/opengl/libs/EGL/egl.cpp
diff options
context:
space:
mode:
authorGary King <gking@nvidia.com>2010-02-09 16:29:32 -0800
committerBrint E. Kriebel <github@bekit.net>2010-12-21 15:26:45 -0800
commitec5be46dbb57a96478df2fdefd258a3e9a5438ad (patch)
tree6a517b461b38eb4092f5b1956d27b19737ccbf0d /opengl/libs/EGL/egl.cpp
parent28806637a1ebdefc401061079e3e4596ebf7b6a5 (diff)
downloadframeworks_base-ec5be46dbb57a96478df2fdefd258a3e9a5438ad.zip
frameworks_base-ec5be46dbb57a96478df2fdefd258a3e9a5438ad.tar.gz
frameworks_base-ec5be46dbb57a96478df2fdefd258a3e9a5438ad.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: I62d3843b67289a1da50ec94f2d558c2ab17f662c
Diffstat (limited to 'opengl/libs/EGL/egl.cpp')
-rw-r--r--opengl/libs/EGL/egl.cpp1
1 files changed, 1 insertions, 0 deletions
diff --git a/opengl/libs/EGL/egl.cpp b/opengl/libs/EGL/egl.cpp
index b97d58b..b4ebfb0 100644
--- a/opengl/libs/EGL/egl.cpp
+++ b/opengl/libs/EGL/egl.cpp
@@ -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) {