diff options
author | Tapani Pälli <[email protected]> | 2019-06-10 13:06:05 +0300 |
---|---|---|
committer | Tapani Pälli <[email protected]> | 2019-09-19 06:39:33 +0000 |
commit | 99cbec0a5f463fef4d9c61f34482d9eb00293704 (patch) | |
tree | aa56f1607bf8f983aebef7b509a0207590364d06 /src/egl/main/eglapi.c | |
parent | a16975e615e6a0ce91a4d2cb936cdaa46e8cfbe8 (diff) |
egl: check for NULL value like eglGetSyncAttribKHR does
Commit d1e1563bb63 added a NULL check for eglGetSyncAttribKHR
but eglGetSyncAttrib does not do this. Patch adds same check to
happen with eglGetSyncAttrib.
Fixes crashes in (when exposing EGL 1.5):
dEQP-EGL.functional.fence_sync.invalid.get_invalid_value
Signed-off-by: Tapani Pälli <[email protected]>
Reviewed-by: Eric Engestrom <[email protected]>
Cc: [email protected]
Diffstat (limited to 'src/egl/main/eglapi.c')
-rw-r--r-- | src/egl/main/eglapi.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/src/egl/main/eglapi.c b/src/egl/main/eglapi.c index bed4ddced68..51557be0864 100644 --- a/src/egl/main/eglapi.c +++ b/src/egl/main/eglapi.c @@ -2115,6 +2115,10 @@ eglGetSyncAttrib(EGLDisplay dpy, EGLSync sync, EGLint attribute, EGLAttrib *valu _EGLDisplay *disp = _eglLockDisplay(dpy); _EGLSync *s = _eglLookupSync(sync, disp); _EGL_FUNC_START(disp, EGL_OBJECT_SYNC_KHR, s, EGL_FALSE); + + if (!value) + RETURN_EGL_ERROR(disp, EGL_BAD_PARAMETER, EGL_FALSE); + return _eglGetSyncAttribCommon(disp, s, attribute, value); } |