[Mesa-dev] [PATCH] Check for NULL native_window into eglCreateWindowSurface()

Chad Versace chad.versace at linux.intel.com
Tue Jun 3 15:47:02 PDT 2014


On Tue, Jun 03, 2014 at 03:42:32PM -0700, Chad Versace wrote:
> On Tue, Jun 03, 2014 at 02:00:13PM -0700, Sinclair Yeh wrote:
> > v2:
> > Incorporated feedback from idr - moved the check to a higher level
> > function.
> > 
> > v1:
> > We have customers using NULL as a way to test the robustness of
> > the API.  Without this check, EGL will segfault trying to
> > dereference dri2_surf->wl_win->private because wl_win is
> > NULL.
> > 
> > This fix adds a check and sets EGL_BAD_NATIVE_WINDOW
> > 
> > Cc: "10.1 10.2" <mesa-stable at lists.freedesktop.org>
> > ---
> >  src/egl/main/eglapi.c | 4 ++++
> >  1 file changed, 4 insertions(+)
> 
> Looks good to me.
> Reviewed-by: Chad Versace <chad.versace at linux.intel.com>
> 
> Ian, you gave the initial feedback, so you should commit.

Sinclair, one more thing. In the future, please prefix the commit
subject with Mesa component name touched by the patch. For example:

    [PATCH] egl: Check for NULL native_window into eglCreateWindowSurface()

Ian, if this patch gets your r-b, please add the prefix before committing.


More information about the mesa-dev mailing list