summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJesse Hall <jessehall@google.com>2015-08-21 07:41:46 -0700
committerWolfgang Wiedmeyer <wolfgit@wiedmeyer.de>2016-03-22 14:57:46 +0100
commit770ff1cf7071f1e53d7e52df129bdc3ba2099b17 (patch)
tree66d7c444e9bb115d12afa85efccf1f3c83b6b82c
parentdcadad708abe4fc3b5dfe122618f3f8d3a19e614 (diff)
downloadframeworks_native-770ff1cf7071f1e53d7e52df129bdc3ba2099b17.zip
frameworks_native-770ff1cf7071f1e53d7e52df129bdc3ba2099b17.tar.gz
frameworks_native-770ff1cf7071f1e53d7e52df129bdc3ba2099b17.tar.bz2
libagl: Fix buffer read overrun in eglCreatePbufferSurface
The code was assuming that EGL_NONE==0, which isn't true. Bug: 23403170 Change-Id: Ic1eccdef086b4d610bd78dbb6b2ae883c91dc322
-rw-r--r--opengl/libagl/egl.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/opengl/libagl/egl.cpp b/opengl/libagl/egl.cpp
index 593d0c2..ee790c9 100644
--- a/opengl/libagl/egl.cpp
+++ b/opengl/libagl/egl.cpp
@@ -1373,7 +1373,7 @@ static EGLSurface createPbufferSurface(EGLDisplay dpy, EGLConfig config,
int32_t w = 0;
int32_t h = 0;
- while (attrib_list[0]) {
+ while (attrib_list[0] != EGL_NONE) {
if (attrib_list[0] == EGL_WIDTH) w = attrib_list[1];
if (attrib_list[0] == EGL_HEIGHT) h = attrib_list[1];
attrib_list+=2;