egl: Unhide functionality in _eglInitSurface()
_eglInitResource() was used to memset entire _EGLSurface by writing more than size of pointed target. This does work as long as Resource is the first element in _EGLSurface, this patch fixes such dependency. Signed-off-by: Juha-Pekka Heikkila <juhapekka.heikkila@gmail.com> Reviewed-by: Brian Paul <brianp@vmware.com>
This commit is contained in:
committed by
Brian Paul
parent
1456ed85f0
commit
498d10e230
@@ -314,7 +314,9 @@ _eglInitSurface(_EGLSurface *surf, _EGLDisplay *dpy, EGLint type,
|
||||
return EGL_FALSE;
|
||||
}
|
||||
|
||||
_eglInitResource(&surf->Resource, sizeof(*surf), dpy);
|
||||
|
||||
memset(surf, 0, sizeof(_EGLSurface));
|
||||
_eglInitResource(&surf->Resource, sizeof(_EGLResource), dpy);
|
||||
surf->Type = type;
|
||||
surf->Config = conf;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user