You've already forked libmali-rockchip
mirror of
https://github.com/armbian/libmali-rockchip.git
synced 2026-01-06 12:03:41 -08:00
hook: Fix crash in eglChooseConfig() without attrs
The attrs might be NULL. Change-Id: If80c15f12f51cc739ee0177da97ac5ae8ec689d1 Signed-off-by: Jeffy Chen <jeffy.chen@rock-chips.com>
This commit is contained in:
@@ -786,6 +786,9 @@ EGLBoolean eglChooseConfig (EGLDisplay dpy, const EGLint *attrib_list, EGLConfig
|
||||
EGLint list[MAX_EGL_ATTRS];
|
||||
int i = 0;
|
||||
|
||||
if (!attrib_list)
|
||||
return _eglChooseConfig(dpy, attrib_list, configs, config_size, num_config);
|
||||
|
||||
while (attrib_list[i] != EGL_NONE) {
|
||||
if (i > MAX_EGL_ATTRS - 2)
|
||||
return EGL_FALSE;
|
||||
|
||||
Reference in New Issue
Block a user