On 11 February 2016 at 12:03, Tapani Pälli <[email protected]> wrote: > From: Daniel Czarnowski <[email protected]> > > Without the check, unsuccessful xcb_dri2_get_buffers_reply(...) causes > segmentation fault in dri2_get_buffers. > > Signed-off-by: Matt Roper <[email protected]> > Cc: "11.0 11.1" <[email protected] Reviewed-by: Emil Velikov <[email protected]>
> --- > src/egl/drivers/dri2/platform_x11.c | 2 ++ > 1 file changed, 2 insertions(+) > > diff --git a/src/egl/drivers/dri2/platform_x11.c > b/src/egl/drivers/dri2/platform_x11.c > index 08cbf2d..931ee51 100644 > --- a/src/egl/drivers/dri2/platform_x11.c > +++ b/src/egl/drivers/dri2/platform_x11.c > @@ -472,6 +472,8 @@ dri2_x11_get_buffers(__DRIdrawable * driDrawable, > dri2_surf->drawable, > count, count, attachments); > reply = xcb_dri2_get_buffers_reply (dri2_dpy->conn, cookie, NULL); > + if (reply == NULL) > + return NULL; Looks great guys. Out of curiosity - did you notice this during inspection, or there was an application that triggered it ? Afaics there are a few other cases where we don't null check the reply before using it. Namely: src/egl/drivers/dri2/platform_x11.c:dri2_create_image_khr_pixmap(), buffers_reply -> bugzilla 93667 src/gallium/auxiliary/vl/vl_winsys_dri.c:vl_dri2_get_flush_reply(), "buffers_reply" Can you send patch(es) for those or shall I ? -Emil _______________________________________________ mesa-dev mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/mesa-dev
