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