libagl: Fix buffer read overrun in eglCreatePbufferSurface

The code was assuming that EGL_NONE==0, which isn't true.

Bug: 23403170
Change-Id: Ic1eccdef086b4d610bd78dbb6b2ae883c91dc322
This commit is contained in:
Jesse Hall 2015-08-21 07:41:46 -07:00 committed by Wolfgang Wiedmeyer
parent dcadad708a
commit 770ff1cf70

View File

@ -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;